[Javascript] INCREDIBLE IE BUG!!!!

Chris Tifer christ at saeweb.com
Mon Oct 13 08:03:20 CDT 2003


Same thing will happen in the Flash Player with ActionScript.


----- Original Message ----- 
From: "Peter Brunone" <peter at brunone.com>
To: "'[JavaScript List]'" <javascript at LaTech.edu>
Sent: Saturday, October 11, 2003 11:16 AM
Subject: RE: [Javascript] INCREDIBLE IE BUG!!!!


> 
>     Dang.  So now we need to round whenever performing floating point
> operations...
> 
>     Any idea if this happens on previous versions of IE?
> 
> -Peter
> 
> -----Original Message-----
> From: javascript-bounces at LaTech.edu On Behalf Of Dan Costea
> 
>     Hi to all,
> 
> If I'm blind or dreaming, please, let me know, but, try this first:
> 
> It's easy to make the following sum in your head:  0.15 + 0.015 = 0.165
> (OBVIOUS!)
> 
> TRY THIS IN YOUR IE 6 WITH SP1:  alert (0.15 + 0.015); you will obtain:
> 164999999999999998
> OR:
> alert (0.15 + 0.015 - 0.15 - 0.015);  - I think the result is obvious
> for any human, but not for IE, that will return: -1.3877787807814457e-17
> (that indeed, is almost 0, but not realy 0...).
> 
> I still can't believe it! And of course, those are not special numbers.
> You can find many, many more (ex: 0.15+0.075, or 0.14+0.016) - I think
> the bug is in the cases that the sum of the last digit of each number is
> 10, and the number of digits representing the precision is different.
> 
> Regards,
> Dan Costea.
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list