Re: round32 ( round64 ( X ) ) ?= round32 ( X )
Delayed response to the "infamous problem of double rounding", 31 March 2011
by Peter Lawrence, with a couple of replies, including references given by
Nelson Beebe to a paper by Sylvie Boldo and Guillaume Melquiond that gives
the quite-old history of "round-to-odd". I'd like to add some more recent
IBM introduced the corresponding notion for DFP with its DFP support on Z and
P systems in 2006, and called it "Round to Prepare for Shorter Precision".
This was needed because one of the intended applications of DFP was support
for arbitrary-precision decimal FP (like MFC's decNumber). The hardware
provides fixed precisions (7, 16 and 34 digits), which can directly support
any fixed precision from 1 to 34 digits using this concept. The rule is a
bit more complicated than simply ORing in Inexactness into the low-order bit:
it is round-inexact-towards-zero unless the surviving least significant digit
would be 0 or 5, in which case it is round-inexact-away-from-zero -- so that
a final 0 or 5 is always known to be exact.
Last year IBM added Round-to-Prepare-for-Shorter-Precision for BFP to its
z196 mainframe, so we now also have round-to-odd in hardware. This was
done precisely to simplify support of the 754-2008 formatOf operations.
---Sent: 2012-01-23 02:48:19 UTC