Comment #2 on issue 3575 by [email protected]: problem with method simplify()
http://code.google.com/p/sympy/issues/detail?id=3575

I've investigated this kind of error before, and from what I remember, it boils down to cancel (actually, just the polynomial division algorithm) expecting the degree to reduce at each step, i.e., for the leading term to go to zero. But with floating point arithmetic, it doesn't. The only way to fix this will be to use a more rigorous floating point ground type in the polys, i.e., some kind of RR(eps), where we consider a == 0 iff |a| < eps. This is a serious deficiency that we should put high on our priority, because a lot of people use floating point coefficients, and they just don't work in a lot of cases because of this issue.

For now, the only work around I'm afraid is to not use floating point coefficients with functions like cancel() that use the polys (or functions like simplify() that call cancel()). You can convert to rational coefficients using nsimplify(). If you do that, everything will work perfectly, but if your expressions are large, it could lead to a slow down, and also you need to be careful that you don't lose or gain extra precision in the process.



--
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