exp() 是 MySQL 的数学函数。此函数用于求 e 的数次幂,即 enumber。
语法
select exp(number);
参数
Number : e中要加的个数。
返回
此函数返回 e 的整数次幂。
示例 1
Select exp(11);
输出:
mysql> Select exp(11);
+-------------------+
| exp(11) |
+-------------------+
| 59874.14171519782 |
+-------------------+
1 row in set (0.01 sec)
+-------------------+
| exp(11) |
+-------------------+
| 59874.14171519782 |
+-------------------+
1 row in set (0.01 sec)
示例 2
Select exp(1);
输出:
mysql> Select exp(1);
+-------------------+
| exp(1) |
+-------------------+
| 2.718281828459045 |
+-------------------+
1 row in set (0.00 sec)
+-------------------+
| exp(1) |
+-------------------+
| 2.718281828459045 |
+-------------------+
1 row in set (0.00 sec)
示例 3
Select exp(-3);
输出:
mysql> Select exp(-3);
+----------------------+
| exp(-3) |
+----------------------+
| 0.049787068367863944 |
+----------------------+
1 row in set (0.00 sec)
+----------------------+
| exp(-3) |
+----------------------+
| 0.049787068367863944 |
+----------------------+
1 row in set (0.00 sec)