
1. Re: Sum with negative Number
Flex harUI Mar 25, 2014 10:34 PM (in response to ndt.company)See past threads on how floating point numbers work. Use toPrecision or toFixed to convert the Number to String

2. Re: Sum with negative Number
ndt.company Mar 26, 2014 5:11 AM (in response to Flex harUI)hi Flex harUI,
Thanks for your repond.
I can fix this problem but I want to know why the result is 1.7763568394002505E15. can you explain for me ?
Thanks,
ndt

3. Re: Sum with negative Number
pauland Mar 26, 2014 5:21 AM (in response to ndt.company)Read this:
http://floatingpointgui.de/basic/
1.7763568394002505E15.
is really
0.00000000000000017763568394002505
So it's a tiny number, almost zero but not quite.
Binary nubers aren't always able to represent floating point values precisely.
It's not actionscript specific  it applies to computers in general.

4. Re: Sum with negative Number
GordonSmith Mar 26, 2014 2:47 PM (in response to ndt.company)Floating point numbers are stored in binary. The fractional bits represent 1/2, 1/4, 1/8, etc. not, 1/10, 1/100, 1/1000. A decimal number like 4.2 cannot be stored exactly in binary, because in binary 0.2 has an infinite repeating sequence of binary fractional digits. Think about trying to represent 1/5 when all you've got to work with is 1/2, 1/4, 1/8, etc.