I'm not sure if the SymPy docs mention it (you'd have to search). The
mpmath docs might, which is what SymPy is using under the hood to do
the rounding.
Aaron Meurer
On Tue, Dec 14, 2021 at 10:56 AM Damien Desfontaines
wrote:
>
> Thanks! Round-to-even in base-2 is perfect for my use case. Is
I believe it uses round-to-even, but note that the rounding is done in
base-2, not base-10. If you're worried about the rounding, you can
evaluate the number to more digits using evalf() to see exactly how it
rounded.
If you want to use a specific base-10 rounding mode, I believe
currently the
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