This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [rfc] rint() rounds to even
- To: Ben Collins <bcollins at debian dot org>
- Subject: Re: [rfc] rint() rounds to even
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 29 Jan 2001 08:59:09 -0800
- Cc: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- References: <20010129113144.K921@visi.net>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
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 `------------------------