Dear Group,

Java BigDecimal serialization to and from the Flash client appears
very broken.  At best I'd say it's just incomplete.  How do those of
you who write financial applications with currency or just simple
applications which need fixed decimal support deal with this?

For example, a number of 1.92 sent to the server in a Number ends up
as 1.9199999999999999289457264239899814128875732421875 in the
BigDecimal on the other end.  If my BigDecimal had a scale of 2 the
result is 1.91.

I understand that Number is an IEEE-754 double-precision
floating-point number, which is the problem here.

If Flex is marketed as a piece of business software without good
support for dollars and cents, fixed decimal numbers, accurate
currency, in short - financial data which drives the business! 
(Having BigDecimal mentioned in the serialization documentation is so
wrong in my mind with this kind of behavior.)

Is there something I am missing?  Is there a way to make this work
correctly?  If not, it looks as though I need to port BigDecimal to
Actionscript.

Thank you for your consideration.






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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to