Le vendredi 25 février 2011 à 18:49 +0300, Alexey U. Gudchenko a écrit : > 25.02.2011 16:03, Ronan Lamy пишет: > > Le vendredi 25 février 2011 à 16:26 +0545, Chris Smith a écrit : > >> Alexey U. Gudchenko wrote: > >>> 25.02.2011 08:59, Alexey U. Gudchenko пишет: > >>> > >>> Conversely, internal calling of series method therefore must be with > >>> option (..., somthing_hack=True) if it options is needed. > >>> > >> > >> If you mean that something internal wants the unshifted series, then > >> yes sudo=True should be used and the O term removed. This would be the > >> same thing as getting the shifted series, removing the O term and > >> doing the substitution yourself of `s.removeO().subs(x, x-x0)`. > >> > >> So if there are no objections, I'll commit this in about 5 hours. > > > > Wait. I don't think that adding yet another option is a good idea, > > particularly when its purpose is to choose between two bad workarounds. > > And 'sudo' is a bad name anyway. > > > > Excuse me, > > > choose between two bad workarounds. > > 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. > (except canonical representation of series, and your remarks that it is > "asymptotic expansion" indeed, not series) As you said, these problems are unrelated with Chris's work. > > > I. > <snip> 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. -- 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.
