44
44
#include <drizzled/functions/numhybrid.h>
45
45
#include <drizzled/functions/num_op.h>
46
46
#include <drizzled/functions/num1.h>
47
#include <drizzled/functions/abs.h>
47
48
#include <drizzled/functions/plus.h>
48
49
#include <drizzled/functions/real.h>
50
#include <drizzled/functions/dec.h>
51
#include <drizzled/functions/exp.h>
52
#include <drizzled/functions/ln.h>
53
#include <drizzled/functions/log.h>
49
54
#include <drizzled/functions/signed.h>
50
55
#include <drizzled/functions/unsigned.h>
52
class Item_func_abs :public Item_func_num1
55
Item_func_abs(Item *a) :Item_func_num1(a) {}
58
my_decimal *decimal_op(my_decimal *);
59
const char *func_name() const { return "abs"; }
60
void fix_length_and_dec();
63
// A class to handle logarithmic and trigonometric functions
65
class Item_dec_func :public Item_real_func
68
Item_dec_func(Item *a) :Item_real_func(a) {}
69
Item_dec_func(Item *a,Item *b) :Item_real_func(a,b) {}
70
void fix_length_and_dec()
72
decimals=NOT_FIXED_DEC; max_length=float_length(decimals);
77
class Item_func_exp :public Item_dec_func
80
Item_func_exp(Item *a) :Item_dec_func(a) {}
82
const char *func_name() const { return "exp"; }
86
class Item_func_ln :public Item_dec_func
89
Item_func_ln(Item *a) :Item_dec_func(a) {}
91
const char *func_name() const { return "ln"; }
95
class Item_func_log :public Item_dec_func
98
Item_func_log(Item *a) :Item_dec_func(a) {}
99
Item_func_log(Item *a,Item *b) :Item_dec_func(a,b) {}
101
const char *func_name() const { return "log"; }
105
class Item_func_log2 :public Item_dec_func
108
Item_func_log2(Item *a) :Item_dec_func(a) {}
110
const char *func_name() const { return "log2"; }
114
class Item_func_log10 :public Item_dec_func
117
Item_func_log10(Item *a) :Item_dec_func(a) {}
119
const char *func_name() const { return "log10"; }
123
57
class Item_func_sqrt :public Item_dec_func