Skip to main content
Version: Latest-3.2

atan

Description

Computes the arc tangent of the argument.

Syntax

DOUBLE atan(DOUBLE arg)

Parameters

arg: You can specify only a numeric value. This function converts the numeric value into a DOUBLE value before it computes the arc tangent of the value.

Return value

Returns a value of the DOUBLE data type.

Usage notes

If you specify a non-numeric value, this function returns NULL.

Examples

mysql> select atan(1);
+--------------------+
| atan(1) |
+--------------------+
| 0.7853981633974483 |
+--------------------+

mysql> select atan(0);
+---------+
| atan(0) |
+---------+
| 0 |
+---------+

mysql> select atan(-1);
+---------------------+
| atan(-1) |
+---------------------+
| -0.7853981633974483 |
+---------------------+

mysql> select atan("");
+----------+
| atan('') |
+----------+
| NULL |
+----------+

keyword

ATAN