# d1mach_IRIX6.f

          DOUBLE PRECISION FUNCTION D1MACH (I)
    C***BEGIN PROLOGUE  D1MACH
    C***PURPOSE  Return floating point machine dependent constants.
    C***LIBRARY   SLATEC
    C***CATEGORY  R1
    C***TYPE      DOUBLE PRECISION (R1MACH-S, D1MACH-D)
    C***KEYWORDS  MACHINE CONSTANTS
    C***AUTHOR  Fox, P. A., (Bell Labs)
    C           Hall, A. D., (Bell Labs)
    C           Schryer, N. L., (Bell Labs)
    C***DESCRIPTION
    C
    C   D1MACH can be used to obtain machine-dependent parameters for the
    C   local machine environment.  It is a function subprogram with one
    C   (input) argument, and can be referenced as follows:
    C
    C        D = D1MACH(I)
    C
    C   where I=1,...,5.  The (output) value of D above is determined by
    C   the (input) value of I.  The results for various values of I are
    C   discussed below.
    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
    C   Assume double precision numbers are represented in the T-digit,
    C   base-B form
    C
    C              sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) )
    C
    C   where 0 .LE. X(I) .LT. B for I=1,...,T, 0 .LT. X(1), and
    C   EMIN .LE. E .LE. EMAX.
    C
    C   The values of B, T, EMIN and EMAX are provided in I1MACH as
    C   follows:
    C   I1MACH(10) = B, the base.
    C   I1MACH(14) = T, the number of base-B digits.
    C   I1MACH(15) = EMIN, the smallest exponent E.
    C   I1MACH(16) = EMAX, the largest exponent E.
    C
    C   To alter this function for a particular environment, the desired
    C   set of DATA statements should be activated by removing the C from
    C   column 1.  Also, the values of D1MACH(1) - D1MACH(4) should be
    C   checked for consistency with the local operating system.
    C
    C***REFERENCES  P. A. Fox, A. D. Hall and N. L. Schryer, Framework for
    C                 a portable library, ACM Transactions on Mathematical
    C                 Software 4, 2 (June 1978), pp. 177-188.
    C***ROUTINES CALLED  XERMSG
    C***REVISION HISTORY  (YYMMDD)
    C   750101  DATE WRITTEN
    C   890213  REVISION DATE from Version 3.2
    C   891214  Prologue converted to Version 4.0 format.  (BAB)
    C   900315  CALLs to XERROR changed to CALLs to XERMSG.  (THJ)
    C   900618  Added DEC RISC constants.  (WRB)
    C   900723  Added IBM RS 6000 constants.  (WRB)
    C   900911  Added SUN 386i constants.  (WRB)
    C   910710  Added HP 730 constants.  (SMR)
    C   911114  Added Convex IEEE constants.  (WRB)
    C   920121  Added SUN -r8 compiler option constants.  (WRB)
    C   920229  Added Touchstone Delta i860 constants.  (WRB)
    C   920501  Reformatted the REFERENCES section.  (WRB)
    C   920625  Added CONVEX -p8 and -pd8 compiler option constants.
    C           (BKS, WRB)
    C   930201  Added DEC Alpha and SGI constants.  (RWC and WRB)
    C***END PROLOGUE  D1MACH