Status: Valid
Owner: ----
Labels: Type-Defect Priority-Critical Solvers WrongResult
New issue 3606 by [email protected]: solve gives wrong result when using
floating point coefficients
http://code.google.com/p/sympy/issues/detail?id=3606
For some floating point coefficients, solve gives the wrong result. The
examples I've found are all cases where the sign is wrong, but they are all
very simple cases.
Aaron found 880a551f368ccc23010afe76bab84ad4fb907b29 to be the first bad
commit:
https://github.com/sympy/sympy/commit/880a551f368ccc23010afe76bab84ad4fb907b29
For example:
In [22]: solve(1.1*x-1.4) #correct
Out[22]: [1.27272727272727]
In [23]: solve(1.1*x-203) #correct
Out[23]: [184.545454545455]
In [24]: solve(1.1*x-203.1) #INCORRECT
Out[24]: [-184.636363636364]
In [31]: solve(2*x-203.1) #INCORRECT
Out[31]: [-101.55]
In [32]: solve(x-203.1) #INCORRECT
Out[32]: [-203.1]
In [33]: solve(x-203.) #correct
Out[33]: [203.0]
--
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.