Closed Bug 839324 Opened 9 years ago Closed 9 years ago

Javascript interpreter changes integers on function calls

Categories

(Core :: JavaScript Engine, defect)

18 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 5856

People

(Reporter: brianberneker, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17

Steps to reproduce:

console.log(10151243671450853);




Actual results:

console responded with 10151243671450852


Expected results:

console should have responded with same number as input.  Instead it reduced the number by 1!  This happens with functions etc., but I use a console.log() call to demonstrate that it is an issue within the interpreter itself.
This bug also occurs in Chrome and Safari.  Possibly an integer storage glitch?
Version: unspecified → 18 Branch
dupe of bug 5856 ?
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Yep.  This is the behavior the spec calls for, since these aren't integers at all: they're doubles.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: js-ieee-double-hurts
You need to log in before you can comment on or make changes to this bug.