Skip to content

COT()

函数说明

COT() 函数返回输入参数(用弧度表示)的余切值。

函数语法

> COT(number)

参数释义

参数 说明
number 必要参数,可取任意数值数据类型

示例

mysql> SELECT COT(12);
+---------------------+
| cot(12)             |
+---------------------+
| -1.5726734063976895 |
+---------------------+
1 row in set (0.00 sec)
drop table if exists t1;
create table t1(a int,b float);
insert into t1 values(1,3.14159);
insert into t1 values(-1,12);

mysql> select cot(a), cot(b) from t1;
+---------------------+---------------------+
| cot(a)              | cot(b)              |
+---------------------+---------------------+
|  0.6420926159343306 |  -394449.0619219334 |
| -0.6420926159343308 | -1.5726734063976895 |
+---------------------+---------------------+
2 rows in set (0.01 sec)