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:

> Now my math may be a little rusty and old, but I always assumed that
> "n.5" always rounded to "n+1".

This is highschool math.  You don't care there about optimizations for
limited precision systems.  The round to even rule is produce results
which are arithmetically more stable.  The implementation is correct.

-- 
---------------.                          ,-.   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]