MySQL ATAN() function
ATAN() function
MySQL ATAN() returns the arc tangent of a number.
Syntax:
ATAN(N);
Argument:
Name | Description |
---|---|
N | A number whose arc tangent value is to be retrieved. |
Alternate Syntax:
ATAN(N2,N1);
Argument:
Argument | Description |
---|---|
N1 | A number. |
N2 | A number. |
Note: ATAN(N1,N2) is similar to calculating the arc tangent of N2 / N1,
Syntax Diagram:

MySQL Version: 5.6
Example:
Code:
SELECT ATAN(4);
Explanation:
The above MySQL statement will return the arc tangent value of the number specified as an argument.
Sample Output:
mysql> SELECT ATAN(4); +------------------+ | ATAN(4) | +------------------+ | 1.32581766366803 | +------------------+ 1 row in set (0.02 sec)
Example : ATAN() function using negative value
Code:
SELECT ATAN(-4);
Explanation:
This statement above will return the arc tangent value of the number defined as an argument.
Sample Output:
mysql> SELECT ATAN(-4); +-------------------+ | ATAN(-4) | +-------------------+ | -1.32581766366803 | +-------------------+ 1 row in set (0.00 sec)
Example : ATAN() function using a division
Code:
SELECT ATAN(3,2);
Explanation:
This statement above will return the arc tangent value of the numbers (i.e. 3 and 2) defined as arguments. Since two arguments are passed, it is similar to calculate the arc tangent of 3 / 2.
Sample Output:
mysql> SELECT ATAN(3,2); +-------------------+ | ATAN(3,2) | +-------------------+ | 0.982793723247329 | +-------------------+ 1 row in set (0.00 sec)
All Mathematical Functions
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook