[Numpy-discussion] Behavior of rint?

Robert Kern robert.kern at gmail.com
Fri Jan 19 10:03:39 EST 2018


On Fri, Jan 19, 2018 at 11:56 PM, Mads Ipsen <madsipsen at gmail.com> wrote:
>
> I am confused . Shouldn't rint round to nearest integer.
http://en.cppreference.com/w/cpp/numeric/math/rint

It does. Matthew was asking specifically about its behavior when it is
rounding numbers ending in .5, not the general case. Since that's the only
real difference between rounding routines, we often recognize that from the
context and speak in a somewhat elliptical way (i.e. just "round-to-even"
instead of "round to the nearest integer and rounding numbers ending in .5
to the nearest even integer").

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180120/c631fd5a/attachment.html>


More information about the NumPy-Discussion mailing list