COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 215 SIN Function
Code:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PICTURE S9V99.
PROCEDURE DIVISION.
MOVE FUNCTION SIN (-10) TO A.
DISPLAY A.
MOVE FUNCTION SIN (0) TO A.
DISPLAY A.
MOVE FUNCTION SIN (.25) TO A.
DISPLAY A.
MOVE FUNCTION SIN (15.5) TO A.
DISPLAY A.
MOVE FUNCTION SIN (45) TO A.
DISPLAY A.
Output:
0.54
0.00
0.24
0.20
0.85
SQRT Function
SQRT, a numeric function, returns a value that approximates the square root of its argument.
argument
is a numeric argument whose value is zero or positive.
The returned value is approximately:
SQRT Function 689










