- 类别:
数值函数 (三角函数)
COS¶
计算其实参的余弦值;实参应以弧度表示。
语法¶
COS( <input_expr> )
实参¶
input_exprThe value or expression to operate on. The value must be in radians, not degrees. The data type must be FLOAT.
返回¶
This function returns a value of type FLOAT.
示例¶
SELECT COS(0), COS(PI()/3), COS(RADIANS(90));
+--------+-------------+------------------+
| COS(0) | COS(PI()/3) | COS(RADIANS(90)) |
|--------+-------------+------------------|
| 1 | 0.5 | 6.123233996e-17 |
+--------+-------------+------------------+