Closed
Bug 378956
Opened 18 years ago
Closed 18 years ago
0.1 * 0.1 = 0.010000000000000002
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
People
(Reporter: mouseit101, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
In seamonkey, 0.1 * 0.1 goes wrong by a very small amount (equals 0.010000000000000002)
Reproducible: Always
Steps to Reproduce:
1.execute javascript outputting 0.1*0.1
2.view the answer being 0.010000000000000002
3.
Actual Results:
The answer was 0.010000000000000002
Expected Results:
0.1 * 0.1 = .01
Default theme
Comment 1•18 years ago
|
||
This is prolly just your common issue with any language that stores floats in binary but I'll let someone else confirm that.
Assignee: nobody → general
Component: General → JavaScript Engine
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → general
Hardware: PC → All
Comment 2•18 years ago
|
||
(oops, forgot to mention in the last comment that I was moving to Core::JavaScript Engine)
Sorry for the double spam.
Comment 3•18 years ago
|
||
This is not a bug in spidermonkey, just a floating-point precision issue.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Comment 4•18 years ago
|
||
damn midairs! actually a dupe of at least bug 5856! Was hoping to get to dupe to such an old bug... :-) but invalid works too.
Status: RESOLVED → VERIFIED
Comment 5•18 years ago
|
||
Actually the dupe would have been better. I wold encourage the submitter to read the explanation in bug 5856.
Comment 6•18 years ago
|
||
Agreed, not a bad dupe at all, Waldemar's explanation is fantastic, dupe away if you like.
Comment 7•18 years ago
|
||
Sorry, reopening to dupe for statistical reasons.
Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
Updated•18 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•