Compiler Library/XL Reference Manual (32650-90029)
2- 25
RAND1 (or RAND1')
RAND1 generates a random number, that can be used as the starting point
for the RAND procedure.
Declaration
FUNCTION RAND1: INTEGER; EXTERNAL;
Attributes
Parameter: None.
Result: A 32-bit integer quantity.
HP FORTRAN 77/XL: Callable as a system intrinsic:I=RAND1( )
Error: None.
Comments
This random value is derived from the 31-bit logical quantity changed
every millisecond by the MPE XL system timer.
SIGN (or SIGN')
SIGN calculates the absolute value of the first real number and gives the
number the sign of the second real number.
Declaration
FUNCTION SIGN(x,y:REAL):REAL; EXTERNAL;
Attributes
Parameters: Both arguments are real numbers; if the second
number is zero, the sign is assumed to be
positive.
Result: A real number.
HP FORTRAN 77/XL: Intrinsic function: Z=SIGN(X,Y).
Error: If either of the arguments is a NaN, there are
two possible actions. If the INVALID trap is
enabled, the message "SIGN FUNCTION: ANY
ARGUMENT=NaN" occurs. Otherwise, the INVALID
flag is set. In either case, a quiet NaN is
returned.
SIN (or SIN')
SIN calculates the sine of a real number in radians.
Declaration
FUNCTION SIN(VAR x:REAL):REAL; EXTERNAL;
Accuracy
When x-y ~ ∈ , maximum f-g ~ ∈ cos x