// objects of type pseries must not have any zero entries, so the
// trivial (zero) pseries needs a special treatment here:
if (seq.size() == 0)
// objects of type pseries must not have any zero entries, so the
// trivial (zero) pseries needs a special treatment here:
if (seq.size() == 0)
}
// print 'coeff', something like (x-1)^42
if (!i->coeff.is_zero()) {
}
// print 'coeff', something like (x-1)^42
if (!i->coeff.is_zero()) {
/** Return degree of highest power of the series. This is usually the exponent
* of the Order term. If s is not the expansion variable of the series, the
* series is examined termwise. */
/** Return degree of highest power of the series. This is usually the exponent
* of the Order term. If s is not the expansion variable of the series, the
* series is examined termwise. */
return (new pseries(relational(var,point), new_seq))->setflag(status_flags::dynallocated | status_flags::evaluated);
}
return (new pseries(relational(var,point), new_seq))->setflag(status_flags::dynallocated | status_flags::evaluated);
}
return (new pseries(relational(var,point), new_seq))->setflag(status_flags::dynallocated | status_flags::evaluated);
}
return (new pseries(relational(var,point), new_seq))->setflag(status_flags::dynallocated | status_flags::evaluated);
}
{
// If expansion variable is being substituted, convert the series to a
// polynomial and do the substitution there because the result might
// no longer be a power series
if (ls.has(var))
{
// If expansion variable is being substituted, convert the series to a
// polynomial and do the substitution there because the result might
// no longer be a power series
if (ls.has(var))
newseq.reserve(seq.size());
epvector::const_iterator it = seq.begin(), itend = seq.end();
while (it != itend) {
newseq.reserve(seq.size());
epvector::const_iterator it = seq.begin(), itend = seq.end();
while (it != itend) {
- newseq.push_back(expair(it->rest.subs(ls, lr), it->coeff));
+ newseq.push_back(expair(it->rest.subs(ls, lr, no_pattern), it->coeff));
- return (new pseries(relational(var,point.subs(ls, lr)), newseq))->setflag(status_flags::dynallocated);
+ return (new pseries(relational(var,point.subs(ls, lr, no_pattern)), newseq))->setflag(status_flags::dynallocated);
/** Implementation of ex::expand() for a power series. It expands all the
* terms individually and returns the resulting series as a new pseries. */
ex pseries::expand(unsigned options) const
/** Implementation of ex::expand() for a power series. It expands all the
* terms individually and returns the resulting series as a new pseries. */
ex pseries::expand(unsigned options) const
bool pseries::is_terminating(void) const
{
return seq.size() == 0 || !is_order_function((seq.end()-1)->rest);
bool pseries::is_terminating(void) const
{
return seq.size() == 0 || !is_order_function((seq.end()-1)->rest);