Updated on 2026-11-06 GMT+08:00

atan

The atan function is used to return the arctangent of the given numeric value a.

Syntax

atan(DOUBLE a) 

Parameters

Parameter

Mandatory

Type

Description

a

Yes

DOUBLE, BIGINT, DECIMAL, or STRING

The format of parameter a includes floating-point format, integer format, and string format. If parameter a is not of type DOUBLE, it is implicitly converted to DOUBLE type before evaluation.

Return Values

Returns a value of type DOUBLE, in the range of -π/2 to π/2.

If a is NULL, NULL is returned.

Example Code

Returns 0.7853981633974483.

select atan(1); 

Returns 0.5404195002705842.

select atan(0.6); 

Returns NULL.

select atan(null);