Closed Bug 478774 Opened 15 years ago Closed 15 years ago

Number.toFixed() returns wrong results

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P3)

x86
Windows XP
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 442293
flash10.1

People

(Reporter: jodyer, Unassigned)

References

Details

Steps to reproduce:
run this function with below parameters
public function print(num:Number, precise:Number):String{
      trace(num.toFixed(precise));
}
 
 Actual Results:
 
print (0.000001,5)---------------------0.00001     


print (0.0000001,6)---------------------0.000001 
print (0.0000002,6)---------------------0.000000(same as expected) 
print (0.0000005,6)---------------------0.000000 
 
 Expected Results:
print (0.000001,5)---------------------0.00000   


print (0.0000001,6)---------------------0.000000
print (0.0000005,6)---------------------0.000001 


 

 
 
 
Transferred Comments:

Chris Peyer - Mon Apr 14 10:17:11 CDT 2008
Spidermonkey returns expected results.

Trevor Baker - Tue Jan 27 14:51:56 CST 2009
back to internal review for reprioritization


This bug transferred from: http://bugs.adobe.com/jira/browse/ASC-3292
Blocks: AS3_Builtins
Priority: -- → P3
Target Milestone: --- → flash10.1
resolve/verified as a duplicate of 442293, they even reference the exact same jira bug, ASC-3292
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.