COS
Descriptionβ
Calculate the cosine of the parameter
Syntaxβ
COS(<a>)
Parametersβ
Parameter | Description |
---|---|
<a> | floating point number, the radian value of the parameter to calculate |
Return Valueβ
The cosine of the parameter <a>
, expressed in radians.
Examplesβ
select cos(1);
+---------------------+
| cos(1.0) |
+---------------------+
| 0.54030230586813977 |
+---------------------+
select cos(0);
+------------------------+
| cos(cast(0 as DOUBLE)) |
+------------------------+
| 1.0 |
+------------------------+
select cos(Pi());
+-----------+
| cos(pi()) |
+-----------+
| -1 |
+-----------+