Re: [Full-disclosure] Firefox has a very serious calculation bug

On Fri, 28 Sep 2007, carl hardwick wrote:

Firefox result: 5.1000000000000005 (WRONG!)

This is a proper behavior of IEEE 754 64-bit double float, which, IIRC, is
precisely what ECMA standard mandates.

You will get the same from any C-style 'double' arithmetics.

Internet Explorer 7 result: 5.1 (OK)

They use a marginally higher precision. Now try 5.002-.001 - chances are,
you will get 5.00999...

Neither is a "very serious calculation bug". Javascript does not guarantee
- and nowhere actually delivers - arbitrary GMP-style precision.


Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia -

Relevant Pages