MySQL: ATAN Function

  • Post author:
  • Post category:MySQL
  • Post comments:1 Comment
MySQL ATAN Function

In this guide, we will explain how to use the MySQL ATAN function with syntax and examples.

Description

The MySQL ATAN function returns the arc tangent of a number or returns the arc tangent of n and m.

Syntax

The syntax for the ATAN function in MySQL is:

ATAN( number )

OR

ATAN( n, m )

Parameters or Arguments

number

The number used to calculate the arc tangent.

n, m

Values used to calculate the arc tangent of two values.

Note

  • When using the second syntax for the ATAN function, the signs of n and m are used to determine the quadrant for the result.

Applies To

The ATAN function can be used in the following versions :

  • MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

Example

Let’s look at some ATAN function examples and explore how to use the ATAN function.

For example:

mysql> SELECT ATAN(0.75);
Result: 0.6435011087932844

mysql> SELECT ATAN(-2);
Result: -1.1071487177940904

mysql> SELECT ATAN(-0.9, 2);
Result: -0.4228539261329407

mysql> SELECT ATAN(PI(), 2);
Result: 1.0038848218538872

Next Topic : Click Here

This Post Has One Comment

Leave a Reply