www.delorie.com/gnu/docs/gcc/g77_77.html | search |
Buy the book! | |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Abs(A) |
Abs: INTEGER
or REAL
function.
The exact type depends on that of argument A---if A is
COMPLEX
, this function's type is REAL
with the same `KIND=' value as the type of A.
Otherwise, this function's type is the same as that of A.
A: INTEGER
, REAL
, or COMPLEX
; scalar; INTENT(IN).
Intrinsic groups: (standard FORTRAN 77).
Description:
Returns the absolute value of A.
If A is type COMPLEX
, the absolute
value is computed as:
SQRT(REALPART(A)**2+IMAGPART(A)**2) |
Otherwise, it is computed by negating A if it is negative, or returning A.
See section 8.11.9.227 Sign Intrinsic, for how to explicitly compute the positive or negative form of the absolute value of an expression.
webmaster | delorie software privacy |
Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |