[fpc-devel] Arbitrary-precision arithmetic unit
Mehmet Erol Sanliturk
sanliturk at ttmail.com
Sun Mar 1 13:38:27 CET 2009
Dear Alexander S. Klenin ,
> 3) Finally, and relevantly for this list,
> should something like this be included into FPC?
I think , in the long run such a facility may be very useful ,
because some times it is becoming necessary to resort such
techniques .
In those days I am working on my Fortran programs to improve them .
There is a test matrix : Finite segments H ( n ) of Infinite
Hilbert matrix : h ( i , j ) = 1 / ( i + j -1 ) , i = 1 ,, n , j = 1 ,, n .
This is a very ill-conditioned matrix . In double precision it is not possible
to invert around H ( 20 ) because determinant becomes very small .
In Free Pascal , by using Extended arithmetic , epsilon as 1.0E-777 , it is
not possible to reach H ( 25 ) .
This means that in such situations it is necessary to resort multiple
precision arithmetic .
Personally , I will use an existing multiple precision Fortran package
( I will study contents of www.netlib.org ) , or
If I can not find a suitable one , I will write such a Fortran set of
subroutines .
For the Free Pascal community , having such a facility at hand during
solving numerical analysis problems would be very useful .
Another important problem is decimal floating point arithmetic ,
especially for financial or legally required computations .
For example , around 1970 , in IBM System/360 , there was BCD : Binary
Coded Decimal . ( I do not know previous state prior that date ) .
Thank you very much .
Mehmet Erol Sanliturk
More information about the fpc-devel
mailing list