COBOL Manual for TNS/E Programs (H06.03+)
Intrinsic Functions
HP COBOL Manual for TNS/E Programs—520347-003
14-60
TAN Function
TAN Function
TAN, a numeric function, returns a value that approximates the tangent of the angle or
arc (in radians) specified by its argument.
argument
is a numeric argument.
The returned value approximates the tangent of the value of argument. It is a floating-
point number with no implied decimal point, precise to approximately 14 digits.
Example 14-41. TAN 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:
-0.64
0.00
0.25
-0.21
1.61
( )
TANFUNCTION argument
VST464.vsd










