This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: missing(?) intrinsics for real(10)
> I don't have induct.f90 on this system. Without a reduced testcase,
> we can't do much. ...
[scala] test/fortran> cat > transpose_10.f90
real(10) :: a(3,3)
a = 1.0_10
a(1,3) = 0.0_10
print *, transpose(a)
end
[scala] test/fortran> gfc transpose_10.f90
/tmp/ccaMoldQ.o(.text+0x1b2): In function `MAIN__':
: undefined reference to `_gfortran_transpose_i10'
collect2: ld returned 1 exit status
> An algorithm that is perfectly fine in REAL(4) may be unstable
> in REAL(8) via the -fdefault-real-8 option.
In general it is the other way: algorithm stable with REAL(8)
may be unstable with REAL(4). So far the only problems I have
seen behaving as you suggest were due to tricks to guess
tiny and friends.
> Do you check the numerical stability of the algorithm?
Changing kind is my quick&dirty way to answer this kind of question:
looking at the common digits gives a rough idea of the result
accuracy (or how close the algorithm is to the stability threshold).
Note that on modern CPU the real(8) are almost as fast as real(4)
and I use the former when I don't want to bother.
Dominique