COBOL Manual for TNS/E Programs (H06.03+)
Intrinsic Functions
HP COBOL Manual for TNS/E Programs—520347-003
14-12
ATAN Function
ATAN Function
ATAN, a numeric function, returns a value in radians that approximates the arctangent
of its argument.
argument
is a numeric argument.
The returned value approximates the arctangent of the value of argument. It is a
floating-point number in the range -pi/2 to +pi/2, excluding the endpoints. It has no
implied decimal point and is precise to approximately 14 digits.
Example 14-4. ATAN Function
Code:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PICTURE S9V99.
PROCEDURE DIVISION.
MOVE FUNCTION ATAN (-10) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (0) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (.25) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (15.5) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (45) TO A.
DISPLAY A.
Output:
-1.47
0.00
0.24
1.50
1.54
( )
ATANFUNCTION argument
VST424.vsd










