Previous: utrp10 Up: ../plot79_u.html Next: utrpp3
INTEGER FUNCTION UTRP2(X)
C$ (Power-of-Two)
C$ This function performs the seemingly trivial task of
C$ determining the power of two for the argument X when the
C$ mantissa lies in the range (1,2-DELTA) (DELTA a small
C$ number).
C$
C$ The first step required is to determine the machine
C$ precision, that is, to find the smallest value EPS such
C$ that 1.0 + EPS is different from 1.0. This is done by
C$ FUNCTION UTREPS, rather than by setting the value in a DATA
C$ statement in order to make the code machine independent.
C$ Experiments indicate that the internal form of a decimal
C$ number may be incorrect by as much as 2*EPS, so to be safe,
C$ the quantity 10*EPS is used as a tolerance.
C$ (09-APR-82)