📜  PLSQL | TAN函数(1)

📅  最后修改于: 2023-12-03 15:33:43.173000             🧑  作者: Mango

PLSQL | TAN Function

Introduction

PLSQL | TAN function is used to determine the tangent of an angle in radians. It returns the value of tangent of a given angle.

Syntax

The syntax of PLSQL | TAN function is as follows:

TAN(n)

Where 'n' is the angle in radians whose tangent is to be determined.

Example

The following example demonstrates the usage of PLSQL | TAN function:

DECLARE
   num NUMBER := 1.5;
   res NUMBER;
BEGIN
   res := TAN(num);
   DBMS_OUTPUT.PUT_LINE('TAN(' || num || ') = ' || res);
END;

-- Output: TAN(1.5) = 14.101419947171719

In this example, we have declared a variable 'num' and assigned the value 1.5 to it. We then called the TAN function and passed the variable 'num' as an argument to it. The result of the function is stored in the variable 'res'. Finally, the result is printed to the console using the DBMS_OUTPUT.PUT_LINE function.

Conclusion

PLSQL | TAN function is a useful mathematical function that can be used to calculate the tangent of a given angle in radians. It can be used in various applications that involve trigonometric calculations.