For this reason people usually use server side scripts to supply flash with correct calculations for finance apps.

It might not look like a big deal until you are using Flash to do some 
financial app, where you obtain a number from a string variable, convert it to 
a number, divide it with something and Math.floor it, all the while thinking 
it's the same as taking a number, divide it with something and Math.floor it.  
(The diff can be as big as 1 because of Math.floor).

- boon

Yotam Laufer <[EMAIL PROTECTED]> wrote: -1.13686837721616e-13 is as close to 
zero as you get matey.... 13 places
after the decimal...

On 07/03/06, Boon Chew  wrote:
How do you usually deal with the loss in precision (a bit oxymoron since
floating point can't be exactly represented) when converting a floating
point string to a number?

var s:String = "952.86";
var i:Number = parseFloat(s);
trace(i);
trace(i - 952.86);   // Not zero!


- boon




---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 | skype:
ubermutt
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

                
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to