github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/function/func_math_exp.test (about)

     1  #SELECT, 嵌套
     2  select log(exp(10));
     3  
     4  #0.5中sqrt暂不支持
     5  #select exp(log(sqrt(10))*2);
     6  
     7  #SELECT
     8  SELECT EXP(2);
     9  SELECT EXP(-2);
    10  SELECT EXP(0);
    11  
    12  
    13  #EXTREME VALUE,科学计数
    14  
    15  select EXP(0.00000000000000001);
    16  select EXP(2e2);
    17  select EXP(0.141241241241313);
    18  select EXP(-124314124124.12412341);
    19  
    20  
    21  #NULL
    22  select exp(null);
    23  
    24  #INSERT
    25  CREATE TABLE t1(a DOUBLE);
    26  INSERT INTO t1 select (exp(56));
    27  INSERT INTO t1 select (exp(100));
    28  SELECT * FROM t1 ORDER BY a;
    29  drop table t1;
    30  
    31  #DATATYPE
    32  create table t1(a tinyint, b SMALLINT, c bigint, d INT, e BIGINT, f FLOAT, g DOUBLE, h decimal(38,19));
    33  insert into t1 values(1, 1, 2, 4, 5, 5.5, 31.13, 14.314);
    34  select EXP(a),EXP(b),EXP(c),EXP(d),EXP(e),EXP(f),EXP(g),EXP(h) from t1;
    35  drop table t1;
    36  
    37  #算术操作
    38  select EXP(123.54-123.03);
    39  select EXP(123.54*0.34);
    40  select EXP(134)-EXP(194);
    41  
    42  
    43  #WHERE,distinct
    44  drop table if exists t1;
    45  create table t1(a int);
    46  insert into t1 values(10), (100);
    47  select distinct * from t1 where exp(a)>0;
    48  drop table t1;
    49  
    50  #ON CONDITION
    51  create table t1(a INT, b int);
    52  create table t2(a INT, b int);
    53  insert into t1 values(2,4), (100,23);
    54  insert into t2 values(10,100), (4,41);
    55  SELECT t1.a, t2.a FROM t1 JOIN t2 ON (exp(t1.a) <> exp(t2.a));
    56  drop table t1;
    57  drop table t2;
    58  
    59  
    60  #HAVING,比较操作
    61  drop table if exists t1;
    62  create table t1(a float,  b float);
    63  insert into t1 values(14.413, 43.413), (8.123, 0.409);
    64  select b from t1 group by b having exp(b)>0;
    65  drop table t1;
    66