Updates:
        Summary: subs or N has an issue with quartic/quadratic root

Comment #7 on issue 2362 by [email protected]: subs or N has an issue with quartic/quadratic root
http://code.google.com/p/sympy/issues/detail?id=2362

Here is another example of evalf problems:

eq = x**2/(1-x)-10**(-S(10))
a,b = solve(eq)
eq.subs(x,a)
-1/10000000000 + (-1/20000000000 + sqrt(40000000001)/20000000000)**2/(-sqrt(40000000001)/20000000000 + 20000000001/20000000000)
eq.subs(x,b).n()
0.e-133
_._prec
1  <====== that means the evaluation failed
eq.n(subs={x:b})
-1.29246970711411e-26  <==== now it worked

The evaluation shouldn't have failed when it contained all Rational numbers. Perhaps when such a failure occurs factor should be attempted?


eq.subs(x,b)
-1/10000000000 + (-sqrt(40000000001)/20000000000 - 1/20000000000)**2/(sqrt(40000000001)/20000000000 + 20000000001/20000000000)
factor(_)
0

cancel(eq.subs(x,b))
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.

Reply via email to