Closed
Bug 888734
Opened 12 years ago
Closed 12 years ago
Some calculation is unpredictable when add a neglect number.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dindog, Unassigned)
Details
These are some results in console:
< 1.3+1.4
> 2.7
< 1.3+(-2)
> -0.7
< 1.3-2.1
> -0.8
Everything seems fines.
< 2.3- 4.23
> -1.9300000000000006
?????
The stable version of Firefox ( 22 ) is affected. Not sure is it reported or not.
...oh, other browsers gave the same results, it's a false alarm?
Sorry guys. I should have checked that before I reported.
Would be grateful if there is somebody fill me in why it works like this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Comment 2•12 years ago
|
||
This is not an issue with JavaScript, it's a limitation of how IEEE-754, the floating point format used in pretty much all computer systems, represents numbers.
See[1] and the various resources linked from there for more details.
[1]: http://stackoverflow.com/questions/588004/is-javascripts-floating-point-math-broken
You need to log in
before you can comment on or make changes to this bug.
Description
•