IMACH
This function retrieves machine integer constants that define the arithmetic used by the computer.
Function Return Value
IMACH(1) = Number of bits per integer storage unit.
IMACH(2) = Number of characters per integer storage unit:
Integers are represented in M-digit, base A form as
where σ is the sign and 0 ≤ xk < A, k = 0, …, M.
Then,
IMACH(3) = A, the base.
IMACH(4) = M, the number of base-A digits.
IMACH(5) = AM − 1, the largest integer.
The machine model assumes that floating-point numbers are represented in normalized N-digit, base B form as
where σ is the sign, 0 < x1 < B, 0 ≤ xk < B, k = 2, …, N and E min ≤ E ≤ Emax. Then,
IMACH(7) =
, the number base-B-digits in single precision.
IMACH(8) =
, the smallest single precision exponent.
IMACH(9) =
, the largest single precision exponent.
IMACH(10) =
, the number base-
B-digits in double precision.
IMACH(11) =
, the smallest double precision exponent.
IMACH(12) =
, largest double precision exponent.
Required Arguments
I — Index of the desired constant. (Input)
FORTRAN 90 Interface
Generic: IMACH (I)
Specific: The specific interface name is IMACH.
FORTRAN 77 Interface
Single: IMACH (I)