SQL ATAN: Calculate Arctangent

The SQL ATAN function returns an arc tangent of an input argument.

In math, the arctangent(x) is the inverse of tangent of x when x is a real number.

Suppose

tan y = x

so

arctanx= tan-1 x = y

Syntax

The following shows the syntax of the ATAN function.

ATAN(x)Code language: SQL (Structured Query Language) (sql)

Argument

The ATAN function accepts an argument x

Return

The ATAN function returns the arc tangent of x, i.e.,  the value whose tangent is x.

Examples

The following example shows how to use the ATAN function

SELECT ATAN(0.5);Code language: SQL (Structured Query Language) (sql)
       atan
-------------------
 0.463647609000806
(1 row)Code language: SQL (Structured Query Language) (sql)

Most database systems support the ATAN function.

Was this tutorial helpful ?