view libcruft/misc/r1mach.f @ 12312:b10ea6efdc58 release-3-4-x ss-3-3-91

version is now 3.3.91
author John W. Eaton <jwe@octave.org>
date Mon, 31 Jan 2011 08:36:58 -0500
parents 32b15d5c3147
children
line wrap: on
line source

      double precision function r1mach (i)
      integer i
      logical init
      double precision rmach(5)
      double precision slamch
      external slamch
      save init, rmach
      data init /.false./
      if (.not. init) then
        rmach(1) = slamch ('u')
        rmach(2) = slamch ('o')
        rmach(3) = slamch ('e')
        rmach(4) = slamch ('p')
        rmach(5) = log10 (slamch ('b'))
        init = .true.
      endif
      if (i .lt. 1 .or. i .gt. 5) goto 999
      r1mach = rmach(i)
      return
  999 write (*, 1999) i
 1999 format (' r1mach - i out of bounds', i10)
      call xstopx (' ')
      d1mach = 0
      end