This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/19443] New: log10 statement does not work properly in gfortran


The log10 operator in gfortran (cygwin build 20041213) does not work properly if
the statement is operated on a variable, but it works fine when operating on a
constant.  The plain log statement works fine regardless.  If the following
program is executed, one can observer that log for the two methods generates the
same value, but log10 using the different methods produces different results. 
The 10*log10(tst) appears to generate -Infinity, where it should generate -50.

program test
  implicit none
  real :: tst
  
  tst=1e-5
  write(*,*) 10*log(1e-5), 10*log(tst)
  write(*,*) 10*log10(1e-5), 10*log10(tst)
end program test

-- 
           Summary: log10 statement does not work properly in gfortran
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mgilbert at airborne dot nrl dot navy dot mil
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19443


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]