Fortran Compiler bug?

From: Padiyath Sreekumaran <Kumar.Padiyath_at_psi.ch>
Date: Fri, 15 Oct 2004 10:41:15 +0200

    Hello,
    One of the user has found out the following difference
    in results between HP Fortran compiler on tru64 and Lahey
    Fortran running on PC. Has any one noticed this problem?
    The OS is Tru64 V5.1A and Fortran Compiler version
     Compaq Fortran V5.5-1877
     Compaq Fortran Compiler V5.5-1877-48BBF

     Program Listing:
     ================
       d = 0.1
       x = 10.
       do i = 1,10
       x = x*d
       y = exp(-x)
       z = 1. - exp(-x)
       write(*,*)x,y,z
       enddo
       stop
       end

     The program compiled with f90 -o prog prog.f
     The output from both compiler:
 
     (Lahey compiler are what you get with a HP32S II, hand held
calculator!)

x exp(-x) 1 - exp(-x) 1 - exp(-x)
                                            Lahey FORTRAN
---------------------------------------------------------
1 0.3678795 0.6321205 0.63212
0.1 0.9048374 9.5162570E-2 0.951626 E-1
0.01 0.9900498 9.9501610E-3 0.995017E-2
1.0x10-3 0.9990005 9.9951029 E-4
0.999500 E-3
1.0x10-4 0.9999000 1.0001659 E-4
0.999950 E-4
1.0x10-5 0.9999900 1.0013580E-5 0.999995E-5
1.0x10-6 0.9999990 1.0132790E-6 0.100000 E-5
1.0x10-7 0.9999999 1.1920929E-7 0.100000 E-6
1.0x10-8 1.0000000 0.0000000
0.100000 E-7
1.0x10-9 1.0000000 0.0000000
0.100000 E-8
      
    with best regards,
       Kumar
    

  
    
Received on Fri Oct 15 2004 - 08:43:49 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT