]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
- added historical note.
[ginac.git] / ginac / pseries.cpp
index 2c8aa8f602218854a17ecc632adec9418d1efda9..398ca82c13c24e0ec02c6e458d09abb4ba47aebd 100644 (file)
@@ -119,7 +119,7 @@ void pseries::archive(archive_node &n) const
 DEFAULT_UNARCHIVE(pseries)
 
 //////////
-// functions overriding virtual functions from bases classes
+// functions overriding virtual functions from base classes
 //////////
 
 void pseries::print(const print_context & c, unsigned level) const
@@ -429,7 +429,7 @@ ex pseries::expand(unsigned options) const
                ++i;
        }
        return (new pseries(relational(var,point), newseq))
-               ->setflag(status_flags::dynallocated | status_flags::expanded);
+               ->setflag(status_flags::dynallocated | (options == 0 ? status_flags::expanded : 0));
 }
 
 /** Implementation of ex::diff() for a power series.  It treats the series as a
@@ -757,6 +757,7 @@ ex mul::series(const relational & r, int order, unsigned options) const
 ex pseries::power_const(const numeric &p, int deg) const
 {
        // method:
+       // (due to Leonhard Euler)
        // let A(x) be this series and for the time being let it start with a
        // constant (later we'll generalize):
        //     A(x) = a_0 + a_1*x + a_2*x^2 + ...