Hi,
I am trying to compile the "double double precision" ddfun90 package from
http://crd.lbl.gov/~dhbailey/mpdist/mpdist.html
with the following sample program taken from the readme file:
program main
use ddmodule
implicit none
type (dd_real) a, b
a = 1.d0
b = cos(a)**2 + sin(a)**2 - 1.d0
call ddwrite(6, b)
stop
end program
Ok, I had to made some minor changes to the second.f routine, but that's
not the matter. The strange thing is that, even if I use the same
gfortran version (based on GCC 4.3.1) I can compile it without problems
on an AMD Debian Linux machine while it fails to compile on a G4 PowerPC
with the error message:
gfortran -c -ffree-form ddfun90.f ddmod90.f second.f
ddfun90.f:496.43:
z'3FC8F8B83C69A60B', z'BC626D19B9FF8D82', &
1
Error: Integer too big for integer kind 8 at (1)
The affected blocks are
data cs/ &
z'3FEF6297CFF75CB0', z'3C7562172A361FD3', &
z'3FC8F8B83C69A60B', z'BC626D19B9FF8D82', &
z'3FED906BCF328D46', z'3C7457E610231AC2', &
z'3FD87DE2A6AEA963', z'BC672CEDD3D5A610', &
z'3FEA9B66290EA1A3', z'3C39F630E8B6DAC8', &
z'3FE1C73B39AE68C8', z'3C8B25DD267F6600', &
z'3FE6A09E667F3BCD', z'BC8BDD3413B26456', &
z'3FE6A09E667F3BCD', z'BC8BDD3413B26456' /
data pi/ z'400921FB54442D18', z'3CA1A62633145C07'/
! data cs/ &
! 9.8078528040323043D-01, 1.8546939997825006D-17, &
! 1.9509032201612828D-01, -7.9910790684617313D-18, &
! 9.2387953251128674D-01, 1.7645047084336677D-17, &
! 3.8268343236508978D-01, -1.0050772696461588D-17, &
! 8.3146961230254524D-01, 1.4073856984728024D-18, &
! 5.5557023301960218D-01, 4.7094109405616768D-17, &
! 7.0710678118654757D-01, -4.8336466567264567D-17, &
! 7.0710678118654757D-01, -4.8336466567264567D-17/
! data pi / 3.1415926535897931D+00, 1.2246467991473532D-16/
Is there any option (like -fno-range-check, but this doesn't help here)
to circumvent this problem without corrupting the high precision (might
this happen if I simply uncomment the second of two data blocks and
comment-out the first after line 496? Since these data are each 18
digits of plain decimal double precision rather than 16 digits of
hexadecimal)? Or is ddfun90 simply buggy/incompatible with gfortran and
I have to use the probably lower precision option provided by the second
block?
Maybe there is even a more recent package for quad or even arbitrary
precision arithmetics?
Many thanks in advance,
Ingo