The documentation's actually fairly clear on this: "The cosine of a 90
degree angle is zero, but because of the inherent inaccuracy of decimal
calculations using binary numbers, Flash Player will report a number
extremely close to, but not exactly equal to, zero."

 

Nevertheless, it seems... sloppy to me.

 

Michael Krotscheck

Senior Developer

 


RESOURCE INTERACTIVE

<http://www.resource.com/> www.resource.com <http://www.resource.com> 

614 621 2888  main

 

  
614 410 3195  direct

412 726 8087  mobile

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Sunday, September 16, 2007 5:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Math.cos...?

 

> Why does Math.cos(Math.PI/2) not return zero?

Round-off error in the Math libs? It does return a value very close to
0 (1.7xe-17).

Troy.

 

Reply via email to