LOG10E mystery constant

Rico Wind ricow at google.com
Sun Feb 20 21:53:06 PST 2011


This was recently fixed in V8, see:
http://code.google.com/p/chromium/issues/detail?id=72555

Cheers,
Rico
On Feb 21, 2011 6:47 AM, "Mark S. Miller" <erights at google.com> wrote:
> On Sun, Feb 20, 2011 at 9:26 PM, John Cowan <cowan at mercury.ccil.org>
wrote:
>
>> Mark S. Miller scripsit:
>>
>> > This is the only constant whose actual value differs across browsers:
>> >
>> > 0.43429448190325176 v8 version 2.3.9 [console: dumb]
>> > 0.4342944819032518 Chrome 11.0.672.2 dev
>>
>> [etc.]
>>
>> The two values are really the same value when represented as an IEEE
>> double. The difference is in the printing routine, not the internal
>> representation. Specifically, the "...2518" browsers are rounding, the
>> "...25176" browsers are not.
>>
>
> But they convert to back to two different floating point numbers, at least
> on all the browsers I quickly tried.
>
>> 0.43429448190325176 === 0.4342944819032518
> false
>> 0.43429448190325176 < 0.4342944819032518
> true
>> 0.43429448190325176 > 0.4342944819032518
> false
>
> A little more testing reveals that the two numbers seem to be consecutive,
> in the sense that there are no intermediate representable numbers.
>
>
>>
>> "Floating-point numbers are a little like sandpiles; every time you pick
>> one up, you get a little less sand and a little more dirt." (But this
>> is not true of integers up to 2^53, slightly less than 10^16.
>>
>> --
>> John Cowan <cowan at ccil.org>
>> Yakka foob mog. Grug pubbawup zink wattoom gazork. Chumble spuzz.
>> --Calvin, giving Newton's First Law "in his own words"
>>
>
>
>
> --
> Cheers,
> --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/test262-discuss/attachments/20110221/db72ad34/attachment.html>


More information about the test262-discuss mailing list