~~~~~~~~~~~~~~~~~~~~~~ SOME FORTRAN FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~ ---------------------------------------------------------------------------------+-----------------+----------- TYPE OF TYPE OF VALUE | | RESULT OF FUNCTION DESCRIPTION ARGUMENT(S) (RETURN VALUE) | EXAMPLE | EXAMPLE ---------------------------------------------------------------------------------+-----------------+----------- ABS(x) Absolute value of x Integer or Real Same as argument | ABS(-1.55) | 1.5500000 REAL(x) Conversion of x to real type Integer Real | REAL(15) | 15.000000 INT(x) Integer part of x Real Integer | INT(4.68) | 4 SQRT(x) Square root of x Real Real | SQRT(2.77) | 1.664332 EXP(x) Exponential function, e**x Real Real | EXP(-1.4) | 0.2465970 LOG(x) Natural logarithm of x, lnx Real Real | LOG(3.5) | 1.252763 LOG10(x) Logarithm for base 10 Real Real | LOG10(3.5) | 0.5440680 COS(x) Cosine of x radians Real Real | COS(0.5) | 0.8775826 SIN(x) Sine of x radians Real Real | SIN(0.5) | 0.4794255 TAN(x) Tangent of x radians Real Real | TAN(0.5) | 0.5463025 ACOS(x) Angle whose cosine is x Real Real | ACOS(0.5) | 1.047198 ASIN(x) Angle whose sine is x Real Real | ASIN(0.5) | 0.5235988 ATAN(x) Angle whose tangent is x Real Real | ATAN(0.5) | 0.4636476 MOD(x,y) x (mod y); x - INT(x/y)*y Integer or Real Same as argument | MOD(255,8) | 7 MAX(x1,...,xn) Maximum of x1,...,xn Integer or Real Same as argument | MAX(3,5,7,12,4) | 12 MIN(x1,...,xn) Minimum of x1,...,xn Integer or Real Same as argument | MIN(-8.5,1.1,0.)| -8.500000 ---------------------------------------------------------------------------------+-----------------------------