So you might want to consider using a "long long" data type, or even wrap up your money handling routines into a C++ class that hides the actual type.
-- Keith
At 4:56 PM -0700 12/26/03, Phil Hartley wrote:
Dave
I would go a bit further than the other replies. When you're dealing with monetary values, you should NEVER use floating point. It's implicitly inaccurate. Use either Integer arithmetic or Decimal arithmetic which probably means that you should use Integer arithmetic on the Palm.
Phil
P.S. I actually have seen FP being used in an application written in a bank. I won't mention which one.
"Dave Mottorn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]andI have my own conversion routines to get decimal strings to floating point numbers and they seem to work. However when I add the resulting floating point numbers I get errors. I looked at a few additions in the debuggerit's definitely doing it wrong. For example when I add 52333.08 to23821.71> with about 15 subtotals on it and two of them are a penny high.I get 76154.80 instead of 76154.79. It gets an answer that's a penny high in the cases I've seen and it's fairly frequent. I have a little report
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
