------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-01-25 09:45 ------- I am sorry, I missed this thread completely:
I think that this is a problem with gfortran's log10(real*4). The following works correctly with the gcc built at the same time as gfortran - gcc (GCC) 4.0.0 20050117 (experimental): #include <math.h> #include <stdio.h> int main (void) { float tst4 = 1.0e-5; double tst8 = 1.0e-5; printf ("Literal ....%f\n", 10*log10 (1.0e-5)); printf ("Float.......%f\n", 10*log10 (tst4)); printf ("Double......%f\n", 10*log10 (tst8)); return 0; } program test implicit none REAL*4 :: tst4 real*8 :: tst8 tst4 = 1e-5_4 tst8 = 1e-5_8 write (*,*) "log with real*4 ......", 10*log (1e-5_4), 10*log (tst4) write (*,*) "log with real*8 ......", 10*log (1e-5_8), 10*log (tst8) write (*,*) "log10 with real*4 ....", 10*log10 (1e-5_4), 10*log10 (tst4) write (*,*) "log10 with real*8 ....", 10*log10 (1e-5_8), 10*log10 (tst8) end program test log with real*4 ...... -115.1292 -115.1292 log with real*8 ...... -115.129254649702 -115.129254649702 log10 with real*4 .... -50.00000 -Infinity log10 with real*8 .... -50.0000000000000 -50.0000000000000 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19443