The short answer is that the Number type can't store most decimal fractions exactly. It stores floating point numbers as binary fractions, so there is usually some roundoff error.

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Michael Schmalle
Sent: Monday, March 27, 2006 6:24 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] why is trace(1+0.9+0.7+0.3) = 2.8999999999999995

 

I could swear there was a thread on this precision issue that Gordon Smith answered and it did have to do with the trace function.

Search the archives, I bet you will find it.

Peace, Mike

On 3/27/06, Dima Ulich <[EMAIL PROTECTED]> wrote:

Hi All,

   I was working with number recently and noticed this
weird behaviour trace(1+0.9+0.7+0.3) returns
2.8999999999999995;
   Did anyone else ever seen such thing? Is it a bug?

Dima Ulich

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com


SPONSORED LINKS

Web site design development

Computer software development

Software design and development

Macromedia flex

Software development best practice

 

 


YAHOO! GROUPS LINKS

 

 





--
What goes up, does come down.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to