Compiler Library/XL Reference Manual (32650-90029)
2- 5
Result: A non-negative real number.
HP FORTRAN 77/XL: Intrinsic function: Y=CABS(X).
Error: If either part of the argument is a NaN, there
are two possible actions. If the INVALID trap
is enabled, the message "CABS(X): ANY PART OF
X=NaN" occurs. Otherwise, the INVALID flag is
set. In either case, a quiet NaN is returned.
If
a
and/or
b
are near the overflow threshold
(
a
and/or
b
approximately equals to 1038 ), the
message "CABS OVERFLOW" occurs. See Appendix A
for more details.
CCOS (or CCOS')
CCOS calculates the cosine of a complex number.
Declaration
Complex numbers in HP FORTRAN 77/XL programs are represented as an
ordered pair (a 2-element array) of real numbers: one for the real part
a
and one for the imaginary part
b
. Thus, complex numbers occupy eight
bytes.
TYPE complex=RECORD
realpart:REAL;
imagpart:REAL;
END;
FUNCTION CCOS(VAR x:complex):complex; EXTERNAL;
Accuracy
Depends on the accuracy of SIN, COS, and EXP.
Attributes
Parameter: A complex number.
Result: A complex number.
HP FORTRAN 77/XL: Intrinsic function: Y=CCOS(X).
Error: See the SIN, COS, and EXP error descriptions.
CCOSH (or CCOSH')
CCOSH calculates the hyperbolic cosine of a complex number.
Declaration
Complex numbers in HP FORTRAN 77/XL programs are represented as an
ordered pair of real numbers: one for the real part
a
and one for the
imaginary part
b
. Thus, complex numbers occupy eight bytes.
TYPE complex=RECORD
realpart:REAL;
imagpart:REAL;
END;
FUNCTION CCOSH(VAR x:complex):complex; EXTERNAL;
Accuracy
Depends on the accuracy of SIN, COS, COSH, and SINH.