SUBROUTINE NumericInfo USE Numeric_Kinds_Module USE FileUnits_Module USE Precision_Module IMPLICIT NONE ! Author: Gregory A. Parker, Department of Physics and Astronomy, University of Oklahoma ! Prints numeric kind information for integers and reals INTEGER(KIND=IW_Kind) :: I ! INTEGER REAL(KIND=WP_Kind) :: W ! Floating Point Number ! Integers WRITE(Out_Unit,*) WRITE(Out_Unit,*) IF(IW_Kind.eq.I8_Kind)THEN WRITE(Out_Unit,*)'Working Integers are 64 Bits=Double Precision' ELSE IF(IW_Kind.eq.I4_Kind)THEN WRITE(Out_Unit,*)'Working Integers are 32 Bits=Single Precision' ELSE IF(IW_Kind.eq.I2_Kind)THEN WRITE(Out_Unit,*)'Working Integers are 16 Bits' ELSE IF(IW_Kind.eq.I1_Kind)THEN WRITE(Out_Unit,*)'Working Integers are 8 Bits' ELSE WRITE(Out_Unit,*)'Error in NumericInfo for IW_Kind: IW_Kind=',IW_Kind STOP 'Error in NumericInfo for IW_Kind' ENDIF WRITE(Out_Unit,*)'Integer I Results' WRITE(Out_Unit,*)'For IW_Kind=',IW_Kind, ' the computer results are:' WRITE(Out_Unit,*)'BIT_SIZE=',BIT_SIZE(I) WRITE(Out_Unit,*)'DIGITS=',DIGITS(I) WRITE(Out_Unit,*)'HUGE',HUGE(I) WRITE(Out_Unit,*)'RADIX',RADIX(I) WRITE(Out_Unit,*)'RANGE',RANGE(I) IHuge=HUGE(I) ! Floating Point Numbers WRITE(Out_Unit,*) WRITE(Out_Unit,*) IF(WP_Kind.eq.QP_Kind)THEN WRITE(Out_Unit,*)'Working Reals are 128 Bits=Quadruple Precision' ELSE IF(WP_Kind.eq.DP_Kind)THEN WRITE(Out_Unit,*)'Working Reals are 64 Bits=Double Precision' ELSE IF(WP_Kind.eq.SP_Kind)THEN WRITE(Out_Unit,*)'Working Reals are 32 Bits=Single Precision' ELSE WRITE(Out_Unit,*)'Error in NumericInfo for WP_Kind: WP_Kind=', WP_kind STOP 'Error in NumericInfo for WP_Kind' ENDIF WRITE(Out_Unit,*)'Floating Point Number Results' WRITE(Out_Unit,*)'For WP_Kind=',WP_Kind, ' the computer results are:' WRITE(Out_Unit,*)'DIGITS=',DIGITS(W) WRITE(Out_Unit,*)'MAXEXPONENT',MAXEXPONENT(W) WRITE(Out_Unit,*)'MINEXPONENT',MINEXPONENT(W) WRITE(Out_Unit,*)'EPSILON',EPSILON(W) WRITE(Out_Unit,*)'TINY',TINY(W) WRITE(Out_Unit,*)'HUGE',HUGE(W) WRITE(Out_Unit,*)'PRECISION',PRECISION(W) WRITE(Out_Unit,*)'RADIX',RADIX(W) WRITE(Out_Unit,*)'RANGE',RANGE(W) RHuge=HUGE(W) RTiny=TINY(W) REpsilon=EPSILON(W) RETURN END SUBROUTINE NumericInfo