roundTiesToEven

Graydon Hoare graydon at mozilla.com
Mon Nov 12 18:57:21 PST 2007


Graydon Hoare wrote:

>    - You can actually represent 0.5 in the first place! Binary floating
>      point cannot. Decimal can. In the default decimal context, 0.5 + 0.5
>      gives an exact decimal answer; there is no rounding to worry about.

Oops, excuse me: 0.1. As I've had pointed out, 0.5 is happily 
representable in both :)

(And ... I appear to be quick on the draw on this thread anyways; if the 
RI happens to set up its binary floating point rounding modes, that's a 
correctly-reported bug in it. SML/NJ has surprised us with its mapping 
of IEEE754 binary floating point several times already. No change to the 
existing ES3 binary floating point is intended. Sorry, mea culpa.)

-Graydon





More information about the Es4-discuss mailing list