Title: Re: [SPAM] Re: [flexcoders] Re: decimal numbers in financial applications

Guys,

FP precision is based upon the machine capabilities. Normally this is guaranteed to 2^64 –1 as FP is usually encoded using 2*32 bit registers on mac and on PC 32 bit. Big or Small Edian aside, the IEEE ratification is standard amongst all OS platforms however some have extended the format to cater for there own nuances.

Try http://www.psc.edu/general/software/packages/ieee/ieee.html

Now when you perform arithmetic on 2 DP numbers, there are some failures which occur. Check out http://en.wikipedia.org/wiki/Floating_point for why.

Regards
Samuel

PS. So it isnt a fault with flex’s use of the data type – it is just inherent to all OS’s.


On 17/8/06 23:20, "Anatole Tartakovsky" <[EMAIL PROTECTED]> wrote:


 
 

Ryan,
With double, precision should not be an issue  - usually "money" datatype is limited to 18 digits and in most practical applications is limited to 11-12 digits. If you work with doubles (16+ correct digits) t would take quite a few operations to get precision under 12 digits. In terms of individual operations, in order to get 1 cent rounding error for the original case
 
1.9199999999999999289457264239899814128875732421875 * amount, the amount has to be over
      50000000000000.
 
You decide if it is practical or not
 
Regards,
Anatole


 
On 8/17/06, ryanm <[EMAIL PROTECTED]> wrote:
> Apparently you acknowledge that it would work but need to keep BigDecimal
> for other reasons.
>
I get the impresson that they want some calculations to be done "real
time" on the client, and for that a BigDecimal object would be needed in the
client as well as on the server.

ryanm


 

 
    

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to