Skip to main content

SEC

Description​

Returns the secant of x, where x is the value in radians, only input and output are supported as double. Input null value will return null value.

Syntax​

SEC(<x>)

Parameters​

ParameterDescription
<x>The value for which the secant is to be calculated

Return Value​

Returns a Double type value means the secant of x.

Example​

select sec(1),sec(2),sec(1000);
+--------------------+--------------------+--------------------+
| sec(1) | sec(2) | sec(1000) |
+--------------------+--------------------+--------------------+
| 1.8508157176809255 | -2.402997961722381 | 1.7781600385912715 |
+--------------------+--------------------+--------------------+

Input null value.

select sec(null);
+--------------------+
| sec(null) |
+--------------------+
| NULL |
+--------------------+