SQL/MySQL/Math/LOG
Версия от 13:46, 26 мая 2010; (обсуждение)
Use log
/*
mysql> select LOG(20);
+----------------+
| LOG(20) |
+----------------+
| 2.995732273554 |
+----------------+
1 row in set (0.00 sec)
mysql> select LOG(20, 40);
+-----------------+
| LOG(20, 40) |
+-----------------+
| 1.2313782131598 |
+-----------------+
1 row in set (0.01 sec)
*/
select LOG(20);
select LOG(20, 40);
Use LOG10 and LOG2
/*
mysql> select LOG10(10);
+-----------+
| LOG10(10) |
+-----------+
| 1 |
+-----------+
1 row in set (0.00 sec)
mysql> select LOG2(8);
+---------+
| LOG2(8) |
+---------+
| 3 |
+---------+
1 row in set (0.00 sec)
*/
select LOG10(10);
select LOG2(8);