All users were logged out of Bugzilla on October 13th, 2018

Number.toString fails for 2.274341322658976E-309

RESOLVED DUPLICATE of bug 664523

Status

--
major
RESOLVED DUPLICATE of bug 664523
9 years ago
7 years ago

People

(Reporter: mguillemot, Unassigned)

Tracking

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.0.16) Gecko/2009121601 Ubuntu/9.04 (jaunty) Firefox/3.0.16
Build Identifier: 

"" + 2.274341322658976E-309

expected: 2.274341322658976E-309
actual: F.74341322658976e-310

Reproducible: Always




String conversion for numbers occurs in org.mozilla.javascript.DToA which was obviously originally written in C. Has someone already evaluated removing this class to use Java standard String conversion facilities?

Comment 1

9 years ago
I'd love it if we could compatibly jettison org.mozilla.javascript.DToA in favor of standard Java methods, but haven't looked at it.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

7 years ago
Like bug #664523, this is fixed with the patch for bug #548857 and also works in our ported version of V8-DToA.

Regarding using Java metods like java.lang.Double.toString(): I investigated in this, but unfortunately, ES has different requirements (if I remember correctly it requires the string to represent the smallest number that will parse to the original bits).
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 664523
You need to log in before you can comment on or make changes to this bug.