C dfcnst.for from contour1.for 31 Jul 2006
C----------------------------------------------------------------------------
      SUBROUTINE DFCNST(DRMACH,MAX)
      implicit double precision (a-h,o-z)

      DOUBLE PRECISION DRMACH(MAX)
C     RETURN MAX MACHINE CONSTANTS(OR THE NUMBER AVAILABLE)
C     IN ARRAY DRMACH.

C     THIS MODULE PROVIDES CONSTANTS WHICH ARE EXPLICITLY DEPENDENT
C     ON MACHINE ARCHITECTURE AND SHOULD BE EXAMINED WHEN MAKING ANY
C     MIGRATION OF THE RAY TRACING ROUTINES.
C
C
C     DOUBLE PRECISION RMACH(5) ! 25 Mar 2006
      DOUBLE PRECISION RMACH(9) ! 25 Mar 2006
C
C     SINGLE PRECISION MACHINE CONSTANTS
C      (SEE DIGITAL SIGNAL PROCESSING, IEEE PRESS 1979 P S-7)
C
C     THE CONSTANTS ARE DERIVED FROM THE FOLLOWING
C     FORM FOR FLOATING POINT NUMBERS:
C
C        SIGN (B**E)*( (X(1)/B) + ... + (X(T)/B**T) )
C     FOR MOST MACHINES THE BASE B=2.
C     FOR THE CYBER 60-BIT MACHINES
C        T=48, EMIN=-974 AND EMAX=1070.
C     FOR THE PDP-11 AND VAX-11 MACHINES
C        T=24, EMIN=-127 AND EMAX=127
C
C     RMACH(1)  SMALLEST POSITIVE MAGNITUDE = B**(EMIN-1)
C     RMACH(2)  LARGEST MAGNITUDE           = B**EMAX*(1-B**(-T))
C     RMACH(3)  SMALLEST RELATIVE SPACING   = B**(-T)
C     RMACH(4)  LARGEST RELATIVE SPACING    = B**(1-T)
C     RMACH(5)                              = LOG10(B=2)
C
C     CONSTANTS HERE ARE FOR CDC 6000/7000/CYBER SERIES COMPUTERS
C     PLEASE SUBSTITUTE FOR OTHER MACHINES
C
C
C      INTEGER SMALL(2)
C      INTEGER LARGE(2)
C      INTEGER RIGHT(2)
C      INTEGER DIVER(2)
C      INTEGER LOG10(2)
CC
C      EQUIVALENCE (RMACH(1),SMALL(1))
C      EQUIVALENCE (RMACH(2),LARGE(1))
C      EQUIVALENCE (RMACH(3),RIGHT(1))
C      EQUIVALENCE (RMACH(4),DIVER(1))
C      EQUIVALENCE (RMACH(5),LOG10(1))
C
C     MACHINE CONSTANTS FOR CYBER 170/180 COMPUTERS
C
ccccc      DATA RMACH(1) / O"00014000000000000000" /
ccccc      DATA RMACH(2) / O"37767777777777777777" /
ccccc      DATA RMACH(3) / O"16404000000000000000" /
ccccc      DATA RMACH(4) / O"16414000000000000000" /
ccccc      DATA RMACH(5) / O"17164642023241175720" /
C
C***REFERENCES  FOX, P.A., HALL, A.D., SCHRYER, N.L, *FRAMEWORK FOR
C                 A PORTABLE LIBRARY*, ACM TRANSACTIONS ON MATHE-
C                 MATICAL SOFTWARE, VOL. 4, NO. 2, JUNE 1978,
C                 PP. 177-188.
C***ROUTINES CALLED  XERROR
C***END PROLOGUE  R1MACH
C     MACHINE CONSTANTS FOR VAX 11/780
C     (EXPRESSED IN INTEGER AND HEXADECIMAL)
C    ***THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX SYSYEMS***
C    *** THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS***
C
C     DATA SMALL(1), SMALL(2) /        128,           0 /
C     DATA LARGE(1), LARGE(2) /     -32769,          -1 /
C     DATA RIGHT(1), RIGHT(2) /       9344,           0 /
C     DATA DIVER(1), DIVER(2) /       9472,           0 /
C     DATA LOG10(1), LOG10(2) /  546979738,  -805796613 /
C
C     DATA SMALL(1), SMALL(2) / Z00000080, Z00000000 /
C     DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF /
C     DATA RIGHT(1), RIGHT(2) / Z00002480, Z00000000 /
C     DATA DIVER(1), DIVER(2) / Z00002500, Z00000000 /
C     DATA LOG10(1), LOG10(2) / Z209A3F9A, ZCFF884FB /
C
C   MACHINE CONSTANTS FOR VAX 11/780 (G-FLOATING)
C     (EXPRESSED IN INTEGER AND HEXADECIMAL)
C    ***THE HEX FORMAT BELOW MAY NOT BE SUITABLE FOR UNIX
SYSYEMS***
C    *** THE INTEGER FORMAT SHOULD BE OK FOR UNIX SYSTEMS***
C
C     DATA SMALL(1), SMALL(2) /         16,           0 /
C     DATA LARGE(1), LARGE(2) /     -32769,          -1 /
C     DATA RIGHT(1), RIGHT(2) /      15552,           0 /
C     DATA DIVER(1), DIVER(2) /      15568,           0 /
C     DATA LOG10(1), LOG10(2) /  1142112243, 2046775455 /
C
C     DATA SMALL(1), SMALL(2) / Z00000010, Z00000000 /
C     DATA LARGE(1), LARGE(2) / ZFFFF7FFF, ZFFFFFFFF /
C     DATA RIGHT(1), RIGHT(2) / Z00003CC0, Z00000000 /
C     DATA DIVER(1), DIVER(2) / Z00003CD0, Z00000000 /
C     DATA LOG10(1), LOG10(2) / Z44133FF3, Z79FF509F /
C
C     MACHINE CONSTANTS FOR THE CRAY 1
C
C     DATA SMALL(1) / 201354000000000000000B /
C     DATA SMALL(2) / 000000000000000000000B /
C
C     DATA LARGE(1) / 577767777777777777777B /
C     DATA LARGE(2) / 000007777777777777774B /
C
C     DATA RIGHT(1) / 376434000000000000000B /
C     DATA RIGHT(2) / 000000000000000000000B /
C
C     DATA DIVER(1) / 376444000000000000000B /
C     DATA DIVER(2) / 000000000000000000000B /
C
C     DATA LOG10(1) / 377774642023241175717B /
C     DATA LOG10(2) / 000007571421742254654B /
C
ccccc      CALL RMOVE(DRMACH,RMACH,MIN0(MAX,5))
C
      END
C----------------------------------------------------------------------
