      double precision function d1mach (i)
c
c  double-precision machine constants
c
c  d1mach(1) = b**(emin-1), the smallest positive magnitude.
c  d1mach(2) = b**emax*(1 - b**(-t)), the largest magnitude.
c  d1mach(3) = b**(-t), the smallest relative spacing.
c  d1mach(4) = b**(1-t), the largest relative spacing.
c  d1mach(5) = log10(b)
c  d1mach(6) = 'nan', not a number.  a bit pattern not in the
c              legal number range to be used when an answer
c              or part of an answer is undefined.  this constant
c              is analogous to the ieee standard nan and to
c              cdc's indefinite.
c
c  to alter this function for a particular environment,
c  the desired set of data statements should be activated by
c  removing the c from column 1.
c
      double precision dmach(6)
c
c     machine constants for the burroughs 1700 system.
c
c     data dmach (1) / 4.31908d-78 /
c     data dmach (2) / 5.78827d76 /
c     data dmach (3) / 8.67362d-19 /
c     data dmach (4) / 1.73472d-18 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 5.78854d76 /
c
c     machine constants for the burroughs 5700 system.
c
c     data dmach (1) / 8.76013d-47 /
c     data dmach (2) / 4.31260d68 /
c     data dmach (3) / 3.30872d-24 /
c     data dmach (4) / 2.64698d-23 /
c     data dmach (5) / .9030899869 9194358564 1216684173 5d0 /
c     data dmach (6) / 4.31280d68 /
c
c     machine constants for the burroughs 6700/7700 systems.
c
c     data dmach (1) / 1.93899d-29581 /
c     data dmach (2) / 1.94838d29603 /
c     data dmach (3) / 3.30872d-24 /
c     data dmach (4) / 2.64698d-23 /
c     data dmach (5) / .9030899869 9194358564 1216684173 5d0 /
c     data dmach (6) / 1.94847d29603 /
c
c     machine constants for the cdc 6000/7000 series.
c
c     data dmach (1) / 4.40823d-280 /
c     data dmach (2) / 1.26472d322 /
c     data dmach (3) / 1.26218d-29 /
c     data dmach (4) / 2.52435d-29 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.26478d322 /
c
c     machine constants for the cray 1
c
c     data dmach (1) / 4.58507d-2467 /
c     data dmach (2) / 5.45249d2465 /
c     data dmach (3) / 2.52435d-29 /
c     data dmach (4) / 5.04871d-29 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 5.45274d2465 /
c
c     machine constants for the harris 220
c
c     data dmach (1) / 2.93941d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 3.63798d-12 /
c     data dmach (4) / 7.27596d-12 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for the honeywell 600/6000 series.
c
c     data dmach (1) / 2.93941d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 1.08420d-19 /
c     data dmach (4) / 2.16840d-19 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for the data general eclipse s/200
c
      data dmach(1) / 5.39885d-79 /
      data dmach(2) / 7.23534d75 /
      data dmach(3) / 1.38778d-17 /
      data dmach(4) / 2.22045d-16 /
      data dmach(5) / 1.2041199826 5592478085 4955578898 d0 /
      data dmach(6) / 7.23567d75 /
c
c     machine constants for the ibm 360/370 series,
c     the xerox sigma 5/7/9, the sel systems 85/86,
c     the perkin elmer (interdata) 7/32, and the data general
c     eclipse mv/8000 and mv/10000 systems.
c
c     data dmach (1) / 5.39885d-79 /
c     data dmach (2) / 7.23534d75 /
c     data dmach (3) / 1.38778d-17 /
c     data dmach (4) / 2.22045d-16 /
c     data dmach (5) / 1.2041199826 5592478085 4955578898 d0 /
c     data dmach (6) / 7.23567d75 /
c
c     machine constants for the pdp-10 (ka processor).
c
c     data dmach (1) / 1.97261d-31 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 5.55112d-17 /
c     data dmach (4) / 1.11022d-16 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for the pdp-10 (ki processor).
c
c     data dmach (1) / 1.46971d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 2.16840d-19 /
c     data dmach (4) / 4.33681d-19 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for pdp-11 (and vax-11) fortran's supporting
c     32-bit integer arithmetic.
c
c     data dmach (1) / 2.93941d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 1.38778d-17 /
c     data dmach (4) / 2.77556d-17 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for pdp-11 fortran's supporting
c     16-bit integer arithmetic.
c
c     data dmach (1) / 2.93941d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 1.38778d-17 /
c     data dmach (4) / 2.77556d-17 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for the univac 1100 series.
c
c     note that the punch unit, i1mach(3), has been set to 7
c     which is appropriate for the univac-for system.
c     if you have the univac-ftn system, set it to 1.
c
c     data dmach (1) / 2.78198d-309 /
c     data dmach (2) / 8.98640d307 /
c     data dmach (3) / 8.67362d-19 /
c     data dmach (4) / 1.73472d-18 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 8.98681d307 /
c
c     machine constants for the ieee standard (intel 8087 and
c     intel 8086 emulator)
c
c     data dmach (1) / 2.22559d-308 /
c     data dmach (2) / 1.79728d308 /
c     data dmach (3) / 1.11022d-16 /
c     data dmach (4) / 2.22045d-16 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.79736d308 /
c
c     machine constants for the hp 2100
c     3 word double precision option with ftn4
c
c     data dmach (1) / 1.46971d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 1.81899d-12 /
c     data dmach (4) / 3.63798d-12 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
c     machine constants for the hp 2100
c     4 word double precision option with ftn4
c
c     data dmach (1) / 1.46971d-39 /
c     data dmach (2) / 1.70102d38 /
c     data dmach (3) / 2.77556d-17 /
c     data dmach (4) / 5.55112d-17 /
c     data dmach (5) / .3010299956 6398119521 3738894724 5d0 /
c     data dmach (6) / 1.70110d38 /
c
      if (i.lt.1 .or. i.gt.6) call seterr (23hd1mach  i out of bounds,
     1  23, 1, 2)
c
      d1mach = dmach(i)
      return
c
      end