[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ROUNDing
Date: Thu, 27 Jun 1991 11:44 EDT
From: JGA@ALDERAAN.SCRC.Symbolics.COM (John G. Aspinall)
The behaviour of ROUND is determined by the IEEE standard on
floating-point operations. The rationale behind the standard is, in
turn, that rounding should be unbiased in a statistical sense.
That was essentially what I said in my message as well.
However, I happened to pick up a copy of Knuth later in the afternoon,
and found the section where he talks about rounding (Seminumerical
Algorithms, section 4.2.2). I couldn't find many details, but at one
point he said that the "right" way to round a number that is exactly
half-way between two units depends on the radix -- if it's even you
round towards the even number, if it's odd you round towards the odd
number. Then he pointed out that all the commonly-used bases are even,
so it's simplest to remember that rounding should be towards the even
number.
barmar
- Follow-Ups:
- ROUNDing
- From: andy@chestnut.com (Andy Latto)
- References:
- ROUNDing
- From: JGA@ALDERAAN.SCRC.Symbolics.COM (John G. Aspinall)