PLSQL | TAN Function
The TAN function is an inbuilt function in PLSQL which is used to return the tangent of an input number. The tangent is a trigonometric function of an angle and here the input number is the angle expressed in the form of radians. 180 degree is equal to pi radian.
Syntax:
TAN( number )
Parameters Used:
This function accepts a parameters which are illustrated below:
number – This is the input number which is an angle expressed in Radian.
Return Value:
This function returns a numeric value which is tangent of that input angle.
Supported Versions of Oracle/PLSQL is given below:
- Oracle 12c
- Oracle 11g
- Oracle 10g
- Oracle 9i
- Oracle 8i
Let’s see some examples which illustrate the TAN function:
Example-1:
DECLARE Test_Number number := 3; BEGIN dbms_output.put_line(TAN(Test_Number number)); END;
Output:
-0.142546543074278
In the above example, tangent of 3 is -0.142546543074278
Example-2:
DECLARE Test_Number number := 5.2; BEGIN dbms_output.put_line(TAN(Test_Number number)); END;
Output:
-1.88564187751976
In the above example, the tangent of 5.2 is -1.88564187751976
Example-3:
DECLARE Test_Number number := -5.2; BEGIN dbms_output.put_line(TAN(Test_Number number)); END;
Output:
1.88564187751976
In the above example, the tangent of -5.2 is 1.88564187751976
Advantage:
This function is used to calculate the tangent of a input number.
Recommended Posts:
- PLSQL | MOD Function
- PLSQL | CHR Function
- PLSQL | LN Function
- PLSQL | COS Function
- PLSQL | LOG Function
- PLSQL | EXP Function
- PLSQL | SIN Function
- PLSQL | LEAST Function
- PLSQL | ABS Function
- PLSQL | BITAND Function
- PLSQL | DECOMPOSE Function
- PLSQL | LTRIM Function
- PLSQL | TRUNC Function
- PLSQL | CEIL Function
- PLSQL | LENGTH2 Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


