Closed
Bug 516355
Opened 17 years ago
Closed 17 years ago
parseFloat is not working property when the number exceeds 17 digits
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: lhwci, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
when I use parseFloat method to convert a string to a number,it seems this method doest works well.
e.g.
var str="12121212121212122.44";
when called:
parseFloat(str);
it returns 12121212121212122.45
but if it's the below case:
var str="1212121212121212.44";//note:it's 16 digits now
then:
parseFloat(str);
this will return the correct value 1212121212121212.44
is this a bug or javascript engine problem, or something else?
Reproducible: Always
sorry, what I mean the total digits is mainly talking about the integer section ,not including the decimal section.
Updated•17 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•