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

Joao Morais jcmoraisjr at gmail.com
Sat Mar 10 17:13:06 CET 2012


On Fri, Mar 9, 2012 at 06:36, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
> On 09 Mar 2012, at 10:23, Sven Barth wrote:
>
>> The buzzword for this is Fixed Point Arithmetic. See
>> here: http://en.wikipedia.org/wiki/Fixed-point_arithmetic
>
> And in principle, it's exactly what currency should use. And in fact, it is
> what it does use in FPC on platforms that don't support an x87 fpu.

What about promote the consistency between all platforms and implement
currency as a scaled integer? After all, internally, it isn't a
floating point format.

Joao Morais



More information about the fpc-pascal mailing list