ATAN

ATAN is a mathematical function in SQL that returns the arctangent value of a specified number.

ATAN(X)

  • x: This is the numeric value whose arc tangent is to be calculated. The value of X must be within the range of -∞ to +∞. The resulting angle is in the range of -π/2 to +π/2, and is expressed in radians.

Example

SELECT ATAN(1);

Output

0.7853981633974483

Explanation

The ATAN(1) function call in MySQL returns the arc tangent of 1, which is approximately 0.7854 in radian. ATAN returns the arc tangent of X that is, the value whose tangent is X.

ATAN(numeric) RETURNS double precision

  • numeric: This is the input parameter for the ATAN function. It represents the tangent of the angle you want to find and should be a numeric value. ATAN then returns the arc tangent of this numeric value, expressed as a float in the range of -π/2 to π/2.

Example

SELECT ATAN(1);

Output

0.7853981633974483

Explanation

In this example, the ATAN function returns the arctangent, in radians, of a specified number. The specified number here is 1, and the output 0.7853981633974483 is the arctangent of 1 in radians.

ATAN( float_expression )

  • float_expression: A floating-point number or any valid expression that returns an approximate numeric, or exact numeric data type in SQL Server, for which the arctangent value is to be computed.

Example

SELECT ATAN(1) AS AtanValue

Output

AtanValue
0.78539816

Explanation

The ATAN function in SQL Server calculates the arctangent of the value 1 provided in the argument. As a result of the function, we get the value 0.78539816.

ATAN(number)

  • number: This represents a numeric value, i.e., floating-point numbers, or integers, for which the arc tangent needs to be computed. The value should be in the range of -1 to 1.

Example

SELECT ATAN(1) FROM dual;

Output

0.7853981633974483

Explanation

The ATAN function in Oracle calculates the arc tangent of a number. In the provided example, the ATAN function calculates the arc tangent of 1, which results in approximately 0.7854. The ATAN function in Oracle returns the result in radians.

ATAN(X)

  • x: This is a numeric value for which the arctangent is to be calculated. It represents the tangent of the angle you wish to find. The resulting angle is returned in radians. In SQL, this number can be a real, double precision, or any of the numeric types.

Example

SELECT ATAN(1.5);

Output

0.982793723247329

Explanation

ATAN() function in SQLite computes the arc tangent of a value. The above example takes the arc tangent of the number 1.5 and the output is approximately 0.982793723247329.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.