The COS function in Oracle SQL / PLSQL is used to calculate cosine of numeric value where numeric value is provided in radian format.
It’s mathematically equal to COS(N).
Syntax for the COS function in Oracle SQL / PLSQL is:
Let’s take an example for understanding:
Suppose we want to get the cosine of 30 degree.
SELECT COS(30*22/(7*180)) FROM dual;
The output of the above statement will be:
Notice that we have changed 30 degrees into radians while passing it in COS function.