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

cot1

The cot1 function is used to calculate the cotangent of a, where the input is in radians.

Syntax

cot1(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 or DECIMAL.

If a is NULL, NULL is returned.

Example Code

Returns 1.0000000000000002.

select cot1(pi()/4); 

Returns NULL.

select cot1(null);