ATAN Function [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
ATAN Function
The ATAN function returns the arctangent of the parameter. The function
type is numeric.
Syntax
FUNCTION ATAN (parameter-1)
Parameters
parameter-1 Must be class numeric.
Return Value
The value returned is the approximation of the arctangent of parameter-1
and is between -pi/2 and pi/2, inclusive. The return value is a numeric
value in radians.
Example
77 TAN-OF-ANGLE PIC S9(5)V9(5) VALUE +00000.99998.
77 ANGLE-RADIANS PIC S99V9(5) VALUE ZERO.
:
COMPUTE ANGLE-RADIANS = FUNCTION ATAN (TAN-OF-ANGLE).
DISPLAY TAN-OF-ANGLE.
DISPLAY ANGLE-RADIANS.
The above example displays the following:
+00000.99998
+00.78538
MPE/iX 5.0 Documentation