diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/lg.md b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/lg.md new file mode 100644 index 000000000..c35c8b82b --- /dev/null +++ b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/lg.md @@ -0,0 +1,35 @@ +# **LG()** + +## **Description** + +LG(X) returns the base-10 logarithm of X. + +## **Syntax** + +``` +> LG(X) +``` + +## **Arguments** + +| Arguments | Description | +|-----------|------------------------------------------------| +| X | Required. Any numeric data type supported now. | + +## **Examples** + +```sql +drop table if exists t1; +create table t1(a float, b float); +insert into t1 values(10000,3784.159); +insert into t1 values(2738,682.325); + +mysql> select lg(a),lg(b) from t1; ++-------------------+--------------------+ +| lg(a) | lg(b) | ++-------------------+--------------------+ +| 4 | 3.577969368581086 | +| 3.437433443797971 | 2.8339912916439594 | ++-------------------+--------------------+ +2 rows in set (0.00 sec) +``` diff --git a/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/log2.md b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/log2.md new file mode 100644 index 000000000..aae9b0341 --- /dev/null +++ b/docs/MatrixOne/Reference/Functions-and-Operators/Mathematical/log2.md @@ -0,0 +1,35 @@ +# **LOG2()** + +## **Description** + +LOG2(X) returns the base-2 logarithm of X. + +## **Syntax** + +``` +> LOG2(X) +``` + +## **Arguments** + +| Arguments | Description | +|-----------|------------------------------------------------| +| X | Required. Any numeric data type supported now. | + +## **Examples** + +```sql +drop table if exists t1; +create table t1(a float, b float); +insert into t1 values(1024,17.231); +insert into t1 values(4096,23.331); + +mysql>select log2(a),log2(b) from t1; ++---------+-------------------+ +| log2(a) | log2(b) | ++---------+-------------------+ +| 10 | 4.106934600972237 | +| 12 | 4.544176200820541 | ++---------+-------------------+ +2 rows in set (0.01 sec) +``` diff --git a/mkdocs.yml b/mkdocs.yml index 0fefc2d10..f455a1eee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -459,8 +459,10 @@ nav: - COT(): MatrixOne/Reference/Functions-and-Operators/Mathematical/cot.md - EXP(): MatrixOne/Reference/Functions-and-Operators/Mathematical/exp.md - FLOOR(): MatrixOne/Reference/Functions-and-Operators/Mathematical/floor.md + - LG(): MatrixOne/Reference/Functions-and-Operators/Mathematical/lg.md - LN(): MatrixOne/Reference/Functions-and-Operators/Mathematical/ln.md - LOG(): MatrixOne/Reference/Functions-and-Operators/Mathematical/log.md + - LOG2(): MatrixOne/Reference/Functions-and-Operators/Mathematical/log2.md - PI(): MatrixOne/Reference/Functions-and-Operators/Mathematical/pi.md - POWER(): MatrixOne/Reference/Functions-and-Operators/Mathematical/power.md - RAND(): MatrixOne/Reference/Functions-and-Operators/Mathematical/rand.md