Hi all,
I have been trying to simplify expressions with floating point numbers
and I noticed that the results are quite unpredictable. In many cases
the calculation took indefinite time (until I killed it) or produced
wrong results (infinity or other incorrect expressions). Here is an
example:
simplify of:
2
2.1 - 2.1⋅y + 2⋅x
───────────
3
x
returns:
2
─
x
While:
2
2.1⋅x⋅(1 - y) + 2⋅y⋅x
──────────────────────
3
x
returns infinity.
My workaround is now to use rational numbers instead:
21⋅x⋅(1 - y) 2
──────────── + 2⋅y⋅x
10
─────────────────────
3
x
but it would be better if this could be done automatically. Is there a
simple fix to this problem?
Thanks for your help and sympy!
Cheers,
Bartosz
--
You received this message because you are subscribed to the Google Groups
"sympy" 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?hl=en.