Ronan Lamy wrote:
>> Why f.e. this variant:
>> 
>>  >      h[2]>>>  cos(x).series(x,1,n=2)
>>  >      (1 - x)*sin(1) + cos(1) + O((x - 1)**2)
>> 
>> is bad ?
> 
> What's bad is that '(x - 1)' in the O() is actually a symbol that's
> completely unrelated to x. This could be very confusing and it's
> unlikely that such an expression will be handled correctly by existing
> functions.

What's good is that only the user that reads the docstring is going 
to be able to figure out how to do this. Anyone else is going to just 
get the shifted function result. The commit message is also clear 
about what's happening:

    2) if sudo=True then return the expression with a non-functional
    but proper looking O() term. Symbol trickery is used here to
    replace x with Symbol(str(x-x0)) in the O() term.

> I agree that O() needs to be fixed to take an x0 argument before we
> can  represent expansions at a point other than 0. Correct handling of all
> cases (x0 = oo, O(1, x, x0=0) + O(1, x, x0=1), ...) can probably wait.

Are you ok with proceeding, then? If not, could you clearly tell what it would 
take to get a positive vote?

/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