Comment #8 on issue 3038 by [email protected]: sign change in evalf of complex value as precision is increased
http://code.google.com/p/sympy/issues/detail?id=3038

Just confirming that the issues of comment 2 have been fixed already:

f = 5*sqrt(x) + 5*sqrt(-x + 1) + 5*sqrt(x + 1) - 6*sqrt(5)
jnk, v = solve(f)
r, vcse = cse(v);vcse=vcse[0].subs(reversed(r))
v.n()
0.655814631227503
vcse.n()
0.655814631227503
f.subs(x,v).n(chop=True)
0
f.subs(x,vcse).n(chop=True)
0
sqrt(x).subs(x, v).n(chop=True)
0.809823827278194
sqrt(x).subs(x, vcse).n(chop=True)
0.809823827278194

And using expand(complex=True) when dealing with a complex number expression can help:

v.count_ops()
44
v.expand(complex=True).count_ops()
19


--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to