PDA_D1MACH

Floating point machine dependent constants

Origin

SLATEC / CAMSUN

Implementation Status:

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