------- Comment #2 from fxcoudert at gcc dot gnu dot org 2006-05-30 13:16 ------- Lots of things are going badly here:
$ cat dale.f90 real(4) :: x4 real(8) :: x8 print *, " ** REAL(KIND=4) tests ** " write(*,*) digits(x4), maxexponent(x4), minexponent(x4), & precision(x4), radix(x4), range(x4) write(*,"(80(G40.20))") epsilon(x4), huge(x4), tiny(x4) if (epsilon(x4) == 0.0_4) print *, "EPSILON is wrong" if (tiny(x4) == 0.0_4) print *, "TINY is wrong" print *, " ** REAL(KIND=8) tests ** " write(*,*) digits(x8), maxexponent(x8), minexponent(x8), & precision(x8), radix(x8), range(x8) write(*,"(80(G40.20))") epsilon(x8), huge(x8), tiny(x8) if (epsilon(x8) == 0.0_8) print *, "EPSILON is wrong" if (tiny(x8) == 0.0_8) print *, "TINY is wrong" end On i386-linux, we have: $ gfortran dale.f90 && ./a.out ** REAL(KIND=4) tests ** 24 128 -125 6 2 37 0.11920928955078125000E-06 0.34028234663852885981E+39 0.11754943508222875080E-37 ** REAL(KIND=8) tests ** 53 1024 -1021 15 2 307 0.22204460492503130808E-15 0.17976931348623157081+309 0.22250738585072013831-307 but on i386-mingw32, we get: ** REAL(KIND=4) tests ** 24 128 -125 6 2 38 0.0000000000000000000 +Infinity 0.0000000000000000000 EPSILON is wrong TINY is wrong ** REAL(KIND=8) tests ** 53 1024 -1021 15 2 308 0.0000000000000000000 +Infinity 0.0000000000000000000 EPSILON is wrong TINY is wrong -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27561