Status: Accepted
Owner: smichr
Labels: Type-Defect Priority-Medium

New issue 2061 by smichr: sqrt(-1.0*x) gives infinite recursion
http://code.google.com/p/sympy/issues/detail?id=2061

This happens because a test for coeff is S.One fails since coeff is Real(1).

as_coeff_terms/factors could be changed so only Rationals are returned for the coeff. Then

(-3.0*x).as_coeff_terms() -> -1, (-3.0, x)

(-3.0 + x).as_coeff_factors() -> 0, (-3.0, x)

This would then treat Reals like pi and other such numbers since if you replace 3.0 with pi above those are the results that would be obtained.


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