FORTRAN Reference Manual
Intrinsic Functions
FORTRAN Reference Manual—528615-001
8-5
ACOS Function
Examples of the ABS Function
The following program prints a value of 530.01 for X, 530.01 for Y, and 0.5E-03 for Z: 
COMPLEX xnumber
xnumber = (5.3e2, -3.2)
realnum = -.0005
x = CABS (xnumber)
y = ABS (xnumber)
z = ABS (realnum)
PRINT '(2F9.2, E9.1)', x, y, z
END
ACOS Function
The ACOS function returns an arccosine expressed in radians.
The table below shows the argument and function type for the generic ACOS function 
and its associated specific function.
Considerations
•
The result type of the ACOS function is the same as the type of its argument.
•
The value of ACOS (x), where ABS (x) ≤ 1.0, is the angle a (in radians) such that 
 and x = COS (a)
•
If ABS (x) > 1.0, program execution terminates abnormally with an error message.
Example of the ACOS Function
FORTRAN stores the value .967937 in Y:
y = ACOS (.567)
Syntax Argument Type Function Type
ACOS (x)
ACOS (x) Real Real
DACOS (x) Double Precision Double Precision
x is an arithmetic expression.
0 a π≤≤










