[fpc-pascal] Currency and ABS(-674.59)

Sven Barth pascaldragon at googlemail.com
Fri Mar 9 10:23:37 CET 2012


Am 08.03.2012 13:14, schrieb Marcos Douglas:
> So, if you have two values to storage (amount of decimals is 4) e.g.
> 100.34524 and 2,000.2 you do:
> 100.34524 = 1003452
> 2,000.2 = 20002000
>
> I never heard about this technique before. Very good!

The buzzword for this is Fixed Point Arithmetic. See here: 
http://en.wikipedia.org/wiki/Fixed-point_arithmetic

Regards,
Sven



More information about the fpc-pascal mailing list