[Python-Dev] Python rounding and/or rint
Andrew P. Lentvorski
Sat, 10 Aug 2002 19:49:26 -0700 (PDT)
Now that C9X is an official standard, can we either:
1) add rint() back into the math module (removed since 1.6.1?) or
2) update round() so that it complies with the default rounding mode
I bumped into a bug today because round() doesn't obey the same rounding
semantics as the FP operations do.
While there are lots of arguments about whether or not to add other C9X
functions, I'd like to try and avoid that tarpit.
The primary argument against rint was the lack of being able to write
portable code. In this instance, the *lack* of rint (or its use in
round()) prevents writing portable code as I have no means to match the
rounding semantics of my FP ops from within Python.