Comment #5 on issue 3250 by [email protected]: simplify() results in loss of precision
http://code.google.com/p/sympy/issues/detail?id=3250

The first step is not pass the proper float value along to dtype:

b = a if a.is_Float else a.evalf()

The next step is to figure out how to get mpmath's mpf to respect the precision. mpf is the MPmathRealType that polys uses for dtype as defined in MPmathRealDomain.


from sympy.mpmath import mpf
mpf(pi.n(10))
mpf('3.1415926535846666')
Float(_)
3.14159265358467
mpf(pi.n(100))
mpf('3.1415926535897931')
Float(_)
3.14159265358979
mpf(pi.n(100)._mpf_)
mpf('3.1415926535897931')
Float(_)
3.14159265358979


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