This Oracle tutorial explains how to use the Oracle/PLSQL COS function.
COS
returns the cosine of a value.
The COS
function take arguments in radians where:
radians = (angle * 2 * 3.1416 / 360)
The syntax for the Oracle/PLSQL COS function is:
COS( number )
number
is the number used to calculate the cosine.
Using COS function to find the cosine of 30 degrees:
SQL> select COS(30*2*3.1415926/360) From dual;
-- from w ww . j a v a 2s .c om
COS(30*2*3.1415926/360)
-----------------------
.866025408
SQL> select COS(90 * 3.1415926) from dual;
COS(90*3.1415926)
-----------------
1
SQL> select COS(45 * 3.1415926) from dual;
COS(45*3.1415926)
-----------------
-1
SQL>