Closed Bug 613492 Opened 9 years ago Closed 9 years ago

parseFloat("infinity") should return NaN

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

There's some redundant code in dtoa.c that causes this; will attach a patch to remove it.
Attached patch Patch (obsolete) — Splinter Review
This patch passes tests. An alternative approach is to #define NO_INFNAN_CHECK, but I noticed that previous revisions also removed code from dtoa.c so I did that too.
Assignee: general → jandemooij
Status: NEW → ASSIGNED
Attachment #491836 - Flags: review?(jwalden+bmo)
Attached patch PatchSplinter Review
Forgot to add the right bug number to the test.
Attachment #491836 - Attachment is obsolete: true
Attachment #491838 - Flags: review?(jwalden+bmo)
Attachment #491836 - Flags: review?(jwalden+bmo)
Comment on attachment 491838 [details] [diff] [review]
Patch

Seems reasonable.
Attachment #491838 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/mozilla-central/rev/1b24f8e54d1b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.