mariadb/mysql-test/r/func_math.result
unknown c78629effb Arjens LOG functions changes with small changes and tests added to mysql-test
Docs/manual.texi:
  Manual changes to doccument new functions and function changes
mysql-test/r/func_math.result:
  Extend tests for LOG family functions
mysql-test/t/func_math.test:
  Extend tests for LOG family functions
sql/gen_lex_hash.cc:
  Lex hash changes
sql/item_create.cc:
  Rename old log function to ln
sql/item_create.h:
  More log functions
sql/item_func.cc:
  Implementation of new log function behavior
sql/item_func.h:
  Class definition for new functions
sql/lex.h:
  Function names
sql/sql_yacc.yy:
  Symbols for new LOG function
tests/function.res:
  One more test result change
tests/function.tst:
  One more test change
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2002-07-17 12:11:48 +04:00

42 lines
1.8 KiB
Text

select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5)
5 -6
select ceiling(5.5),ceiling(-5.5);
ceiling(5.5) ceiling(-5.5)
6 -5
select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
truncate(52.64,1) truncate(52.64,2) truncate(52.64,-1) truncate(52.64,-2) truncate(-52.64,1) truncate(-52.64,-1)
52.6 52.64 50 0 -52.6 -50
select round(5.5),round(-5.5);
round(5.5) round(-5.5)
6 -6
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
round(5.64,1) round(5.64,2) round(5.64,-1) round(5.64,-2)
5.6 5.64 10 0
select abs(-10), sign(-5), sign(5), sign(0);
abs(-10) sign(-5) sign(5) sign(0)
10 -1 1 0
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
10.000000 10.000000 NULL NULL NULL 2.000000 NULL NULL
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
10.000000 10.000000 NULL NULL NULL
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
log2(8) log2(15) log2(-2) log2(0) log2(NULL)
3.000000 3.906891 NULL NULL NULL
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
log10(100) log10(18) log10(-4) log10(0) log10(NULL)
2.000000 1.255273 NULL NULL NULL
select pow(10,log10(10)),power(2,4);
pow(10,log10(10)) power(2,4)
10.000000 16.000000
select rand(999999),rand();
rand(999999) rand()
0.014231365187309 0.8078568166195
select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1);
PI() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1)
3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398
select degrees(pi()),radians(360);
degrees(pi()) radians(360)
180 6.2831853071796