Closed
Bug 413965
Opened 17 years ago
Closed 17 years ago
35.05 - 5 = 30.049999999999997
Categories
(Toolkit Graveyard :: Error Console, defect)
Tracking
(Not tracked)
People
(Reporter: kenfehling, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
When I type "35.05 - 5" into the error console or "javascript: 35.05 - 5" into the address window, the answer is 30.049999999999997
Reproducible: Always
Steps to Reproduce:
1. Evaluate (35.05 - 5) using JavaScript
2.
3.
Actual Results:
30.049999999999997
Expected Results:
30.05
I tested this on Firefox 2 and Firefox 3 Beta.
Comment 1•17 years ago
|
||
This is a result of how floating point numbers are held according to the ecmascript spec
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•16 years ago
|
Product: Firefox → Toolkit
Assignee | ||
Updated•8 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•