Comment #4 on issue 1224 by pevzi23: some errors in limit function
http://code.google.com/p/sympy/issues/detail?id=1224

I'm sorry, but so why I get that result, when there must be zero?


In [7]: x = Symbol('x', real=True)

In [8]: limit(x**(2/3)*sin(x**2)/(x-1), x, oo)
Out[8]: nan


Also, when I try 'limit(sin(x), x, oo)', I get an error instead of 'nan':

In [11]: limit(sin(x), x, oo)
---------------------------------------------------------------------------
PoleError                                 Traceback (most recent call last)

/home/pevzi/<ipython console> in <module>()

/usr/lib/python2.6/site-packages/sympy/series/limits.pyc in limit(e, z, z0, dir)
     81         r = gruntz(e, z, z0, dir)
     82     except PoleError:
---> 83         r = heuristics(e, z, z0, dir)
     84     return r
     85

/usr/lib/python2.6/site-packages/sympy/series/limits.pyc in heuristics(e, z, z0, dir)
     86 def heuristics(e, z, z0, dir):
     87     if z0 == oo:
---> 88         return heuristics(e.subs(z, 1/z), z, sympify(0), "+")
     89     elif e.is_Mul:
     90         r = []

/usr/lib/python2.6/site-packages/sympy/series/limits.pyc in heuristics(e, z, z0, dir)
    100         return Add(*r)
    101     elif e.is_Function:
--> 102         return e.subs(e.args[0], heuristics(e.args[0], z, z0, dir))
103 msg = "Don't know how to calculate the limit(%s, %s, %s, dir=%s), sorry."
    104     raise PoleError(msg % (e, z, z0, dir))

/usr/lib/python2.6/site-packages/sympy/series/limits.pyc in heuristics(e, z, z0, dir)
    102         return e.subs(e.args[0], heuristics(e.args[0], z, z0, dir))
103 msg = "Don't know how to calculate the limit(%s, %s, %s, dir=%s), sorry."
--> 104     raise PoleError(msg % (e, z, z0, dir))
    105
    106

PoleError: Don't know how to calculate the limit(1/x, x, 0, dir=+), sorry.



--
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.

Reply via email to