This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] rint() rounds to even


Ben Collins <bcollins@debian.org> writes:

> That's all fine and well, but the docs say "Round to closest integer",
> and nothing about the type of rounding, which should atleast mention
> "round-to-even". Not everyone who uses this is doing so for mathematical
> formulas and may just want to perform some simple math, which they
> assume uses "high school math" of round up at .5

The function is rounding to the closest integer.  The documentation
cannot and will not be changed since it is not required, other
implementation can do something else.  If somebody relies on .5
rounding in a certain way s/he is doing something wrong.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]