I am using window vista 64 bit.
I need to compile a Fortran file, for which i need to edit that file to match my machine's 'machine-dependent-constants'
In that file, i have the following information. Any suggestions would be of great help. Thanks
C Explanation of machine-dependent constants
C
C XINF = largest positive machine number
C XMAX1 = beta ** (p-1), where beta is the radix for the
C floating-point system, and p is the number of base-beta
C digits in the floating-point significand. This is an
C upper bound on non-integral floating-point numbers, and
C the negative of the lower bound on acceptable negative
C arguments for PSI. If rounding i开发者_运维知识库s necessary, round this
C value down.
C XMIN1 = the smallest in magnitude acceptable argument. We
C recommend XMIN1 = MAX(1/XINF,xmin) rounded up, where
C xmin is the smallest positive floating-point number.
C XSMALL = absolute argument below which PI*COTAN(PI*X) may be
C represented by 1/X. We recommend XSMALL < sqrt(3 eps)/pi,
C where eps is the smallest positive number such that
C 1+eps > 1.
C XLARGE = argument beyond which PSI(X) may be represented by
C LOG(X). The solution to the equation
C x*ln(x) = beta ** p
C is a safe value.
C
C Approximate values for some important machines are
C
C beta p eps xmin XINF
C
C CDC 7600 (S.P.) 2 48 7.11E-15 3.13E-294 1.26E+322
C CRAY-1 (S.P.) 2 48 7.11E-15 4.58E-2467 5.45E+2465
C IEEE (IBM/XT,
C SUN, etc.) (S.P.) 2 24 1.19E-07 1.18E-38 3.40E+38
C IEEE (IBM/XT,
C SUN, etc.) (D.P.) 2 53 1.11D-16 2.23E-308 1.79D+308
C IBM 3033 (D.P.) 16 14 1.11D-16 5.40D-79 7.23D+75
C SUN 3/160 (D.P.) 2 53 1.11D-16 2.23D-308 1.79D+308
C VAX 11/780 (S.P.) 2 24 5.96E-08 2.94E-39 1.70E+38
C (D.P.) 2 56 1.39D-17 2.94D-39 1.70D+38
C (G Format) (D.P.) 2 53 1.11D-16 5.57D-309 8.98D+307
C
C XMIN1 XMAX1 XSMALL XLARGE
C
C CDC 7600 (S.P.) 3.13E-294 1.40E+14 4.64E-08 9.42E+12
C CRAY-1 (S.P.) 1.84E-2466 1.40E+14 4.64E-08 9.42E+12
C IEEE (IBM/XT,
C SUN, etc.) (S.P.) 1.18E-38 8.38E+06 1.90E-04 1.20E+06
C IEEE (IBM/XT,
C SUN, etc.) (D.P.) 2.23D-308 4.50D+15 5.80D-09 2.71D+14
C IBM 3033 (D.P.) 1.39D-76 4.50D+15 5.80D-09 2.05D+15
C SUN 3/160 (D.P.) 2.23D-308 4.50D+15 5.80D-09 2.71D+14
C VAX 11/780 (S.P.) 5.89E-39 8.38E+06 1.35E-04 1.20E+06
C (D.P.) 5.89D-39 3.60D+16 2.05D-09 2.05D+15
C (G Format) (D.P.) 1.12D-308 4.50D+15 5.80D-09 2.71D+14
C
You caught me just before sleep, so I'll make this short (cause I just can't write a sensible answer in this state). Fortran has introduced a lot of functions for determining system dependent constants - take a book, or an internet tutorial and look up functions like SELECTED_REAL_KIND, EPSILON (and the links that go from there usually).
Modern Intel CPUs use IEEE compatible floating point arithmetic - and it seems that all these machine constants relate to floating point values, not integers. Therefore I think you should be fine copying the values from the IEEE line in the table you showed. S.P. and D.P refer to single and double precision, you may need to specify this somewhere else and choose the corresponding line in the table.
精彩评论