Closed Bug 1316557 Opened 8 years ago Closed 1 year ago

Math.pow sometimes returns incorrect results

Categories

(Core :: JavaScript Engine, defect, P3)

defect

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.
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.

Severity: normal → S3

(In reply to no.2 from comment #1)

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.

That is a different issue that should have its own bug. Filed bug 1798789.

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
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: