[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46FD3D30.4020108@cruzio.com>
Date: Fri, 28 Sep 2007 10:43:12 -0700
From: Daniel Veditz <dveditz@...zio.com>
To: full-disclosure@...ts.grok.org.uk
Subject: Re: Firefox 2.0.0.7 has a very serious
calculation bug
carl hardwick wrote:
> PoC concept here:
> javascript:5.2-0.1
> (copy this code into address bar)
>
> Firefox 2.0.0.7 result: 5.1000000000000005 (WRONG!)
> Internet Explorer 7 result: 5.1 (OK)
In IE7 and Opera I get the same thing you do for Firefox. This is not
surprising because the ECMAScript specification says that floating point
operations must comply with ANSI/IEEE Std 754-1985: IEEE Standard for
Binary Floating-Point Arithmetic.
The ECMAScript version 4 proposal introduces a decimal type intended to fix
up some of weirdness caused by mapping base-2 floating point rounding back
into base-10 notation.
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/
Powered by blists - more mailing lists