tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Padiyath Sreekumaran <Kumar.Padiyath@psi.ch>
Subject: Fortran Compiler bug?
Date: Fri, 15 Oct 2004 10:41:15 +0200	[thread overview]
Message-ID: <ABC4EFAF3217D311A39200508B08F7FC04A94FBC@psi17.psi.ch> (raw)



    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
    

  
    


                 reply	other threads:[~2004-10-15  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox