Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 2290 by [email protected]: limit(O(x),x,0) fails
http://code.google.com/p/sympy/issues/detail?id=2290
When I try to get the limit of 1+O(x), it succeeds. But the (slightly)
simpler limit of O(x) fails, while it should answer 0.
In [6]: limit(1+O(x),x,0)
Out[6]: 1
In [7]: limit(O(x),x,0)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
/home/fred/<ipython console> in <module>()
/usr/lib/pymodules/python2.6/sympy/series/limits.py in limit(e, z, z0, dir)
89
90 try:
---> 91 r = gruntz(e, z, z0, dir)
92 except PoleError:
93 r = heuristics(e, z, z0, dir)
/usr/lib/pymodules/python2.6/sympy/series/gruntz.py in gruntz(e, z, z0, dir)
505 elif dir == "+":
506 e0 = e.subs(z,z0+1/x)
507 else:
508 raise NotImplementedError("dir must be '+' or '-'")
--> 509 return limitinf(e0, x)
/usr/lib/pymodules/python2.6/sympy/series/gruntz.py in limitinf(e, x)
337 if e.has(log):
338 e = e.normal()
--> 339 c0, e0 = mrv_leadterm(e,x)
340 sig=sign(e0,x)
341 if sig==1: return S.Zero # e0>0: lim f = 0
/usr/lib/pymodules/python2.6/sympy/series/gruntz.py in mrv_leadterm(e, x,
Omega)
389 Omega = [t for t in Omega if subexp(e,t)]
390 if Omega == []:
--> 391 Omega = mrv(e,x)
392 if x in set(Omega):
393 #move the whole omega up (exponentiate each term):
/usr/lib/pymodules/python2.6/sympy/series/gruntz.py in mrv(e, x)
226 #only functions of 1 argument currently implemented
227 raise NotImplementedError("Functions with more
arguments: '%s'" % e)
--> 228 raise NotImplementedError("Don't know how to calculate the mrv
of '%s'" % e)
229
230 def mrv_max(f, g, x):
NotImplementedError: Don't know how to calculate the mrv of 'O(1/_x)'
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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-issues?hl=en.