📅  最后修改于: 2023-12-03 14:45:32.122000             🧑  作者: Mango
ATAN函数是PL/SQL中用于计算反正切值的函数。它接收一个数值参数并返回其反正切值。
ATAN(numeric_expression)
参数说明:
返回值类型:
DECLARE
pi_val CONSTANT NUMBER(9, 8) := 3.14159265;
x_val NUMBER(6, 3);
arctan_val NUMBER;
BEGIN
x_val := 1;
arctan_val := ATAN(x_val);
DBMS_OUTPUT.PUT_LINE('The arctan of ' || x_val || ' is: ' || arctan_val * 180 / pi_val);
x_val := 0.732;
arctan_val := ATAN(x_val);
DBMS_OUTPUT.PUT_LINE('The arctan of ' || x_val || ' is: ' || arctan_val * 180 / pi_val);
x_val := -0.732;
arctan_val := ATAN(x_val);
DBMS_OUTPUT.PUT_LINE('The arctan of ' || x_val || ' is: ' || arctan_val * 180 / pi_val);
END;
输出结果:
The arctan of 1 is: 45
The arctan of .732 is: 35.0002149
The arctan of -.732 is: -35.0002149