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