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

asin

The asin function is used to return the arcsine of the given numeric value a.

Syntax

asin(DOUBLE a) 

Parameters

Parameter

Mandatory

Type

Description

a

Yes

DOUBLE, BIGINT, DECIMAL, or STRING

The value range of parameter a is [-1,1]. The format of 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 the value of a is not within the range [-1, 1], NaN is returned.
  • If a is NULL, NULL is returned.

Example Code

Returns 1.5707963267948966.

select asin(1); 

Returns 0.6435011087932844.

select asin(0.6); 

Returns NULL.

select asin(null); 

Returns NaN.

select asin(10);