Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 4072 by [email protected]: sin(x).rewrite(pow) raises
RuntimeError: maximum recursion depth
http://code.google.com/p/sympy/issues/detail?id=4072
sin(x).rewrite(pow)
...
/home/pape/sympy/sympy/functions/elementary/trigonometric.py in
_eval_rewrite_as_pow(self, arg)
290
291 def _eval_rewrite_as_pow(self, arg):
--> 292 return self.rewrite(cos).rewrite(pow)
293
294 def _eval_rewrite_as_sqrt(self, arg):
/home/pape/sympy/sympy/core/basic.pyc in rewrite(self, *args, **hints)
1634
1635 if not pattern:
-> 1636 return self._eval_rewrite(None, rule, **hints)
1637 else:
1638 if iterable(pattern[0]):
/home/pape/sympy/sympy/core/function.pyc in _eval_rewrite(self, pattern,
rule, **hints)
553 if pattern is None or isinstance(self.func, pattern):
554 if hasattr(self, rule):
--> 555 rewritten = getattr(self, rule)(*args)
556
557 if rewritten is not None:
/home/pape/sympy/sympy/functions/elementary/trigonometric.py in
_eval_rewrite_as_pow(self, arg)
290
291 def _eval_rewrite_as_pow(self, arg):
--> 292 return self.rewrite(cos).rewrite(pow)
293
294 def _eval_rewrite_as_sqrt(self, arg):
/home/pape/sympy/sympy/core/basic.pyc in rewrite(self, *args, **hints)
1634
1635 if not pattern:
-> 1636 return self._eval_rewrite(None, rule, **hints)
1637 else:
1638 if iterable(pattern[0]):
/home/pape/sympy/sympy/core/function.pyc in _eval_rewrite(self, pattern,
rule, **hints)
553 if pattern is None or isinstance(self.func, pattern):
554 if hasattr(self, rule):
--> 555 rewritten = getattr(self, rule)(*args)
556
557 if rewritten is not None:
/home/pape/sympy/sympy/functions/elementary/trigonometric.py in
_eval_rewrite_as_cos(self, arg)
276
277 def _eval_rewrite_as_cos(self, arg):
--> 278 return -cos(arg + S.Pi/2)
279
280 def _eval_rewrite_as_tan(self, arg):
/home/pape/sympy/sympy/core/decorators.pyc in __sympifyit_wrapper(a, b)
75 if not hasattr(b, '_op_priority'):
76 b = sympify(b, strict=True)
---> 77 return func(a, b)
78 except SympifyError:
79 return retval
/home/pape/sympy/sympy/core/decorators.pyc in binary_op_wrapper(self, other)
116 else:
117 return f(self)
--> 118 return func(self, other)
119 return binary_op_wrapper
120 return priority_decorator
/home/pape/sympy/sympy/core/expr.pyc in __div__(self, other)
143 @call_highest_priority('__rdiv__')
144 def __div__(self, other):
--> 145 return Mul(self, Pow(other, S.NegativeOne))
146
147 @_sympifyit('other', NotImplemented)
/home/pape/sympy/sympy/core/cache.pyc in wrapper(*args, **kw_args)
88
89 try:
---> 90 return func_cache_it_cache[k]
91 except (KeyError, TypeError):
92 pass
/home/pape/sympy/sympy/core/numbers.pyc in __hash__(self)
1675
1676 def __hash__(self):
-> 1677 return super(Integer, self).__hash__()
1678
1679 def __index__(self):
/home/pape/sympy/sympy/core/numbers.pyc in __hash__(self)
1362
1363 def __hash__(self):
-> 1364 return super(Rational, self).__hash__()
1365
1366 def factors(self, limit=None, use_trial=True, use_rho=False,
RuntimeError: maximum recursion depth exceeded while calling a Python object
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.