Hi all,

This feels like a very simple problem, but I couldn't find a clear answer 
in the documentation. I have a sympy number x and I would like to round it 
to the nearest float. Suppose I simply use float(x), and that the true 
value of x is between two successive floats a and b.
- If x is slightly closer to a than b, is sympy *guaranteed* to round to a? 
Same question if x is slightly closer to b.
- If x is *exactly* equal to (a+b)/2, will float(x) round it up or down?
- Are there situations where sympy can't be sure whether to round up or 
down? What happens then? Is there a way to detect when that happens?

Thanks a ton in advance,

Damien

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/aa33ca28-6a88-44f8-b872-9fa6717eb22cn%40googlegroups.com.

Reply via email to