CABS (or CABS') [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation
Compiler Library/XL Reference Manual
CABS (or CABS')
CABS calculates the absolute value of a complex number.
Declaration
TYPE complex=RECORD
realpart:REAL;
imagpart:REAL;
END;
FUNCTION CABS(VAR x:complex):REAL; EXTERNAL;
Accuracy
Depends on the accuracy of SQRT.
Attributes
Parameter: Any complex number representable in two real
numbers: one for a and one for b.
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.
MPE/iX 5.0 Documentation