Closed
Bug 1316557
Opened 9 years ago
Closed 2 years ago
Math.pow sometimes returns incorrect results
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
125 Branch
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: h4writer, Assigned: mgaudet)
Details
(Keywords: triage-deferred)
Attachments
(1 file)
Math.pow(-999, -999) should return -0, but under some compiler flags we are returning 0:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=24c5ecf54fb2&selectedJob=30562285
All failures on bug1314438.js are due to this. This is not related to the jits.
Updated•8 years ago
|
Keywords: triage-deferred
Priority: -- → P3
I'm having an issue with Math.pow too.
Math.pow(10, 23) and 10 ** 23 returns 1.0000000000000001e+23
On Chrome it's 1e+23, so I'm using Number("1e" + 23) to get consistent results.
Updated•3 years ago
|
Severity: normal → S3
Comment 2•3 years ago
|
||
(In reply to no.2 from comment #1)
I'm having an issue with Math.pow too.
Math.pow(10, 23)and10 ** 23returns 1.0000000000000001e+23
On Chrome it's 1e+23, so I'm usingNumber("1e" + 23)to get consistent results.
That is a different issue that should have its own bug. Filed bug 1798789.
| Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1fc9ad61a3d1
Test Math.pow(-999,-999) to prevent regression r=nbp
Comment 5•2 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox125:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•