[fpc-devel] General Decimal Arithmetic
m2 at ellipsa.net
Mon Jan 28 12:53:26 CET 2008
Vincent Snijders a écrit :
> john at johneb47.id.au schreef:
>> 2. Are these operations presently available within Free Pascal?
> AFAIK, not distributed and installed by default with Free Pascal. There
> are a number of arbitrary precision libs around, for example bigint from:
Regarding big floats, I know only two libraries, the one of Wolfgang
But they don't follow IEEE standards. With multiprecision numbers, this
is not always possible and, overall, it would be a small disaster for
the running times. For instance, correctly implementing the "Inexact"
error as described in the IEEE standard increases the code size and
slows down computations for a questionable usefulness [*] (with floating
point numbers, what is exceptional is not an inexact result but an exact
one). Even the subnormal numbers are not really necessary (the only
benefit is that, with them, we always have ((A-B = 0) <-> (A = B))).
[*] Of course, in case of a fixed (small) precision decimal library,
like the one of the OP, it might be necessary. "Decimal" libraries are
mainly aimed at financial computations.
More information about the fpc-devel