Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 4017 by [email protected]: Solve rounds small coefficients to
zero
http://code.google.com/p/sympy/issues/detail?id=4017
I'm not sure what's causing this, but solve seems to want to call small
constants zero. I seem to get correct results from 0.7.2 and incorrect
results from 0.7.3.
In [1]: from sympy import *
In [2]: E,m,c=symbols('E,m,c')
In [3]: Energy=Eq(E,m*c**2)
In [4]: solve(Energy,E)
Out[4]: [c**2*m]
In [5]: E2=Energy.subs(c,3e8)
In [6]: solve(E2,E)
Out[6]: [9.0e+16*m]
In [7]: e2=Energy.subs(c,3e-8)
In [8]: solve(e2,E)
Out[8]: [0.0]
It doesn't happen with less small coefficients:
In [9]: e3=Energy.subs(c,0.5)
In [10]: solve(e3,E)
Out[10]: [0.25*m]
--
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.