The function subprograms in this section return machine-dependent information and can be used to enhance portability of programs between different computers. The routines IMACH, and AMACH describe the computer’s arithmetic. The routine UMACH describes the input, ouput, and error output unit numbers.
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(6) = , the base.
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.