Comment #8 on issue 2574 by [email protected]: Wrong assumptions for
LambertW(-1)
http://code.google.com/p/sympy/issues/detail?id=2574
Hmmm, this isn't straightforward to fix. First, care must be taken to avoid
infinite recursion inside the assumptions (e.g. is_positive calling is_real
which calls is_positive...). More importantly, the logic of the fallback to
cmp(expr.evalf(), 0) is broken. For instance:
In [33]: e = 1 - 1/(1-exp(-1000))
In [34]: e.evalf()
Out[34]: .0e-125
In [35]: e.is_positive
Out[35]: True
In [38]: print together(e)
-1/(-1 + exp(1000))
In [39]: together(e).is_positive
Out[39]: False
So I think that the right way of fixing this is to remove this fallback (=
case 3 in AssumeMixin._what_known_about) and to reimplement the
corresponding logic in the appropriate classes.
--
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.