view libcruft/misc/r1mach.f @ 14193:72aebe619641 stable rc-3-6-0-0

3.6.0-rc0 release candidate * configure.ac (AC_INIT): Version is now 3.6.0-rc0. (OCTAVE_RELEASE_DATE): Now 2012-01-10. (OCTAVE_API_VERSION_NUMBER): Now 47.
author John W. Eaton <jwe@octave.org>
date Tue, 10 Jan 2012 16:43:41 -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