abs(3M)
ABS, IABS, DABS, CABS, CDABS - Computes absolute value
Showing IRIX 6.5. First release of IRIX 6.5.
NAME ABS, IABS, DABS, CABS, CDABS - Computes absolute value SYNOPSIS UNICOS and UNICOS/mk systems: ABS ([A=]a) IABS ([A=]a) DABS ([A=]a) CABS ([A=]a) UNICOS and IRIX systems: CDABS ([A=]a) IMPLEMENTATION UNICOS, UNICOS/mk, and IRIX systems STANDARDS Fortran 90 CDABS is a compiler extension to Fortran 90 DESCRIPTION ABS is the generic function name. ABS, IABS, DABS, and CABS are intrinsic and are elemental functions for the CF90 compiler. The entry point CDABS is provided for support in other languages. It is not recognized as an intrinsic function; therefore, you must use the CDIR$ VFUNCTION directive to allow vectorization. These functions evaluate as follows: y = |x|, except for CABS and CDABS, which evaluate the following: 2 2 1/2 y = |(x + x ) |' r i CF90 CDABS is called implicitly by the Fortran 90 compiler as a result of a generic ABS call with a complex double argument. CAL Register Usage (Cray Research Systems Only) Scalar IABS: IABS% (call-by-register) on entry (S1) = argument on exit (S1) = result Scalar DABS: DABS% (call-by-register) on entry (S1) and (S2) = argument on exit (S1) and (S2) = result Scalar CABS: CABS% (call-by-register) on entry (S1) and (S2) = argument on exit (S1) = result Vector CABS: %CABS% (call-by-register) on entry (V1) = argument vector 1 (real part) (V2) = argument vector 2 (imaginary part) on exit (V1) = result vector Scalar CDABS: CDABS% (call-by-register) on entry (S1), (S2), (S3), (S4) = argument on exit (S1), (S2) = result Vector CDABS: %CDABS% (call-by-register) on entry (V1), (V2), (V3), (V4) = argument vector on exit (V1), (V2) = result vector Argument Ranges 2450 infinity is approximately 10 308 On UNICOS/mk systems, infinity is approximately 10 ABS, IABS, DABS: |x| < infinity CABS, CDABS (CDABS is not available on UNICOS/mk systems): |x |, |x | < infinity r i NOTES CDABS is an outmoded routine for the CF90 compiler. Refer to the Fortran Language Reference Manual, Volume 3, publication SR-3905, for information about outmoded features and their preferred standard alternatives. The name of the ABS, IABS, DABS, and CABS intrinsic can be passed as an argument. The name of the CDABS intrinsic cannot be passed as an argument. RETURN VALUES ABS returns the real absolute value of its real argument. IABS returns the integer absolute value of its integer argument. DABS returns the double-precision absolute value of its double-precision argument. CABS returns the absolute value of its complex argument as a real number. CDABS returns the absolute value of its complex double-precision argument as a double-precision number. When the correct value would overflow, CABS and CDABS abort with a floating-point error. On CRAY T90 systems that support IEEE arithmetic, the following return values occur: ABS(x): |x| = infinity, result is infinity x = NaN, result is NaN CABS(x): x or y = NaN, result is NaN |x| = infinity and y is not NaN, result is infinity |y| = inf and x is not NaN, result is infinity When overflow occurs for good input, infinity is returned. SEE ALSO Intrinsic Procedures Reference Manual, publication SR-2138, for the printed version of this man page.