Updates:
        Labels: -NeedsReview NeedsBetterPatch

Comment #10 on issue 1680 by Vinzent.Steinberg: Infinite recursion in cos  
(and other trigonometric functions)
http://code.google.com/p/sympy/issues/detail?id=1680

Thank you a lot for investigating this!

Two comments concerning coding style:

Please make sure to always use

x = value

instead of

x=value

(except for keyword arguments).

Please use

raise Error('message')

instead of the deprecated

raise Error, 'message'

When running the tests I get these failures:

________________________________________________________________________________
_  
sympy/functions/elementary/tests/test_piecewise.py:test_piecewise_integrate  
__
    
File "/home/one/src/sympy/sympy/functions/elementary/tests/test_piecewise.py",  
line
82, in test_piecewise_integrate
     assert integrate(g, (x, -2, 2)) == Rational(14, 3)
   File "/home/one/src/sympy/sympy/utilities/decorator.py", line 56, in  
threaded_decorator
     return func(expr, *args, **kwargs)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 512, in  
integrate
     return integral.doit(deep = False)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 155, in doit
     antideriv = self._eval_integral(function, x)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 275, in  
_eval_integral
     return f._eval_integral(x)
   File "/home/one/src/sympy/sympy/functions/elementary/piecewise.py", line  
156, in
_eval_integral
     adduend = limit(v,x,range.end,dir="-")
   File "/home/one/src/sympy/sympy/series/limits.py", line 91, in limit
     r = gruntz(e, z, z0, dir)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 509, in gruntz
     return limitinf(e0, x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 339, in limitinf
     c0, e0 = mrv_leadterm(e,x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 391, in  
mrv_leadterm
     Omega = mrv(e,x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 227, in mrv
     raise NotImplementedError("Functions with more arguments: '%s'" % e)
NotImplementedError: Functions with more arguments: 'Piecewise((4 - 1/_x, 4  
- 1/_x <
0), (16 - 4/_x - 2*(4 - 1/_x)**2 + (4 - 1/_x)**3/3, 0 <= 4 - 1/_x))'
________________________________________________________________________________
____ sympy/functions/elementary/tests/test_piecewise.py:test_piecewise_fold  
____
    
File "/home/one/src/sympy/sympy/functions/elementary/tests/test_piecewise.py",  
line
143, in test_piecewise_fold
     assert integrate(piecewise_fold(p),(x,-oo,oo)) == integrate(2*x + 2,  
(x, 0, 1))
   File "/home/one/src/sympy/sympy/utilities/decorator.py", line 56, in  
threaded_decorator
     return func(expr, *args, **kwargs)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 512, in  
integrate
     return integral.doit(deep = False)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 155, in doit
     antideriv = self._eval_integral(function, x)
   File "/home/one/src/sympy/sympy/integrals/integrals.py", line 275, in  
_eval_integral
     return f._eval_integral(x)
   File "/home/one/src/sympy/sympy/functions/elementary/piecewise.py", line  
156, in
_eval_integral
     adduend = limit(v,x,range.end,dir="-")
   File "/home/one/src/sympy/sympy/series/limits.py", line 91, in limit
     r = gruntz(e, z, z0, dir)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 509, in gruntz
     return limitinf(e0, x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 339, in limitinf
     c0, e0 = mrv_leadterm(e,x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 391, in  
mrv_leadterm
     Omega = mrv(e,x)
   File "/home/one/src/sympy/sympy/series/gruntz.py", line 227, in mrv
     raise NotImplementedError("Functions with more arguments: '%s'" % e)
NotImplementedError: Functions with more arguments: 'Piecewise((0, -1/_x <  
0), (-2/_x
- 1/_x**2, And(0 <= -1/_x, -1/_x <= 1)), (1, 1 < -1/_x))'


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--

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


Reply via email to