Closed
Bug 466822
Opened 17 years ago
Closed 17 years ago
error in the sum of float
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: diou, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18
This happens with just a few numbers
Reproducible: Always
Steps to Reproduce:
var total = 0;
total += 1.99;
document.write("0 + 1.99 = " + total + "<br>");
total += 1.08;
document.write("1.99 + 1.08 = " + total+"<br>");
Actual Results:
0 + 1.99 = 1.99
1.99 + 1.08 = 3.0700000000000003
Expected Results:
0 + 1.99 = 1.99
1.99 + 1.08 = 3.07
Updated•17 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Updated•17 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•