Status: Accepted Owner: asmeurer CC: [email protected] Labels: Type-Defect Priority-Medium Assumptions
New issue 1600 by asmeurer: abs(im(-(-2)**(S(1)/3))) fails (but only once) http://code.google.com/p/sympy/issues/detail?id=1600 >>> abs(im(-(-2)**(S(1)/3))) Traceback (most recent call last): File "<console>", line 1, in <module> File "./sympy/core/multidimensional.py", line 127, in wrapper return f(*args, **kwargs) File "./sympy/core/cache.py", line 85, in wrapper func_cache_it_cache[k] = r = func(*args, **kw_args) File "./sympy/core/function.py", line 139, in __new__ evaluated = cls.eval(*args) File "./sympy/functions/elementary/complexes.py", line 247, in eval if arg.is_negative: return -arg File "./sympy/core/assumptions.py", line 366, in getit return self._what_known_about(name) File "./sympy/core/assumptions.py", line 302, in _what_known_about self._learn_new_facts( ((k,a),) ) File "./sympy/core/assumptions.py", line 340, in _learn_new_facts self._assume_rules.deduce_all_facts(facts, base) File "./sympy/core/facts.py", line 909, in deduce_all_facts x_new_facts(tf, False) # k -> !i File "./sympy/core/facts.py", line 853, in x_new_facts assert new_facts[k] == v, ('inconsitency between facts',new_facts,k,v) AssertionError: ('inconsitency between facts', {'real': True, 'prime': False, 'comparable': True, 'commutative': True, 'nonpositive': True, 'composite': False, 'positive': False, 'negative': True, 'zero': None, 'complex': True, 'imaginary': False, 'nonzero': True}, 'zero', False) >>> abs(im(-(-2)**(S(1)/3))) ⎛ 3 ⎽⎽⎽⎽⎞ -im⎝-╲╱ -2 ⎠ I guess it is a caching bug. -- 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 [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 -~----------~----~----~----~------~----~------~--~---
