Opened 10 years ago

Closed 8 years ago

#8756 closed defect (patchwelcome)

dojo.number.format returning an incorrect value or large exponentials

Reported by: Douglas Hays Owned by: Adam Peller
Priority: low Milestone: future
Component: Core Version: 1.3.0b1
Keywords: needsreview Cc:
Blocked By: Blocking:

Description

Using 1.3 trunk,

dojo.number.format(99999999999999999999999999999, {})

returns "1.000"
That doesn't look like a good return value. This is affecting #8692. Probably null, undefined, NaN, dojo.number.OUTOFRANGE, or "1e+29", but not "1.000".

Change History (9)

comment:1 Changed 10 years ago by Adam Peller

(In [16817]) Make sure Infinity/-Infinity are formatted to null. Refs #8756

comment:2 Changed 10 years ago by Adam Peller

see [16820]. Moved floating point fudge logic out to an experimental home in dojox.math. Now the result is only as bad as it was before: 1,e+29. Also, you now get null instead of "In,fin,ity" (yikes)

comment:3 Changed 10 years ago by Adam Peller

Summary: dojo.number.format returning an incorrect valuedojo.number.format returning an incorrect value or large exponentials

comment:4 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [16880]) Fixes #8756. Established default maximum Number value of 9e+15. If beyond max, then do not attempt to format to a string.

comment:5 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: closedreopened

Oops - wrong defect - should have closed #8692.

comment:6 Changed 10 years ago by bill

Milestone: tbd1.4

1.3rc1 has been release; bumping remaining tickets to 1.4 (except for documentation/testing tickets)

comment:7 Changed 10 years ago by Adam Peller

Milestone: 1.4future

comment:8 Changed 8 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

peller - what's the status of this?

comment:9 Changed 8 years ago by Adam Peller

Resolution: patchwelcome
Status: reopenedclosed
Note: See TracTickets for help on using tickets.