[MacPorts] #34535: gcc45 @4.5.3_4 gfortran gives wrong results for log and exp functions on OSX lion

MacPorts noreply at macports.org
Sun May 20 14:43:14 PDT 2012


#34535: gcc45 @4.5.3_4 gfortran gives wrong results for log and exp functions on
OSX lion
-------------------------------+--------------------------------------------
 Reporter:  f.baart@…          |       Owner:  macports-tickets@…                   
     Type:  defect             |      Status:  new                                  
 Priority:  Normal             |   Milestone:                                       
Component:  ports              |     Version:  2.1.1                                
 Keywords:                     |        Port:                                       
-------------------------------+--------------------------------------------
 The gfortran compiler generates programs that give incorrect results on
 OSX lion. I have tested the following program with gfortran-mp-4.5 and
 gfortran-mp-4.7.

 {{{
 program test_exp
   write(*,*) exp(1.0), log(2.7182818284590451)
 end program test_exp
 }}}

 This should result in the following output:
 2.71... 1.0...

 However on OSX Lion with gfortran it results in:
 2.7699862       1.3489696

 I have tested it with:
   gcc45 @4.5.3_4
 and
   gcc47 @4.7.0_3

 See also http://stackoverflow.com/questions/10673701/can-i-call-the-
 fortran-log-function-with-a-number for several related test cases.

-- 
Ticket URL: <https://trac.macports.org/ticket/34535>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list