On Thu, Mar 8, 2012 at 3:28 AM, Marcos Douglas <m...@delfire.net> wrote:
> Integer math... what did you mean? Integer math = Currency or in DB numeric(18, 4) in Firebird create domain AMOUNT as numeric(18,4); On Thu, Mar 8, 2012 at 12:43 AM, Graeme Geldenhuys <graemeg.li...@gmail.com>wrote: > This is why our accounting app uses Integer math (and when stored in the > database). Only when amounts are displayed to the user, do we convert the > integer value to currency. This greatly reduced our calculation and > rounding problems. > Yes i do that from more than 10 years, Float/Extended have problem when rounding it and sum that rounding, it is only good in Science not Accounting. Currency for me is Int64 (* int of 10000 or binary shifted) it is more stable and not lose any cent when sum the balances, until i passed it to ABS, ABS convert it to float and return back to Currency, that my problem here. In the future i like to have new kind of Currency (integer) but more extend (* 1000000 for example). Best Regards Zaher Dirkey
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal