mpmath.libmp.libmpf has rounding and conversion tools

Are you working with python floats? Will this work:

def interval(f, dec):
 m = 10**dec
 ff = math.floor(f*m)/m
 if f == ff:
   return f, f
 return ff, ff+1/m

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to