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


On Mon, Jan 29, 2001 at 08:59:09AM -0800, Ulrich Drepper wrote:
> 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.

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

Ben

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'

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