view libcruft/misc/i1mach.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

      integer function i1mach (i)
      integer i, imach(16)
      logical init
      double precision dlamch
      real slamch
      external dlamch, slamch
      save imach, init
      data imach / 5, 6, 0, 6, 32, 4, 2, 31, 2147483647,
     $     2, 0, 0, 0, 0, 0, 0 /
      data init /.false./
      if (.not. init) then
        imach(11) = slamch ('n')
        imach(12) = slamch ('m')
        imach(13) = slamch ('l')
        imach(14) = dlamch ('n')
        imach(15) = dlamch ('m')
        imach(16) = dlamch ('l')
        init = .true.
      endif
      if (i .lt. 1 .or. i .gt. 16) goto 999
      i1mach = imach(i)
      return
  999 write (*, 1999) i
 1999 format (' i1mach - i out of bounds', i10)
      call xstopx (' ')
      i1mach = 0
      end