Ronan Lamy wrote:
> Le mercredi 23 février 2011 à 09:40 +0545, Chris Smith a écrit :
>> Ronan Lamy wrote:
>>>> Also while writing it, I've noticed 2 additional problems with
>>>> Expr.series:
>>>> * The order is off by one.
>>>> * Its name is misleading since it doesn't return a series.
>> 
>> Can you give examples? In 2084 I get:
>> 
>>     >>> cos(x).series(n=3)
>>     1 - x**2/2 + O(x**3)
>> 
>> terms valid up TO n=3 are returned (which is consistent with sympy
>> range behavior).
> 
> The conventional definition of the order of the expansion is that it's
> the degree of the last term included in the polynomial approximation,
> so 
> one less than the order of the excluded terms. Your example is a
> second-order expansion, because it gives a second-order approximation.
> 

The documentation has been updated to reflect that terms up to O(x**n) are 
returned.

> Our definition might be more convenient, but it's not the usual one.
> Maybe this is just a documentation issue.

Til now we have lived with terms refering to factors in a Mul and factors 
refering to terms in an Add...do we need to change the name from series to 
something else or should we just update the docstring?

/c

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to