1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

new round mode - half_up

This commit is contained in:
serg@serg.mylan
2004-10-31 13:15:44 +01:00
parent 65ba01382b
commit afd18341ac
2 changed files with 18 additions and 17 deletions

View File

@@ -19,7 +19,7 @@
#include <my_global.h>
typedef enum {TRUNCATE=0, EVEN} dec_round_mode;
typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP} decimal_round_mode;
typedef int32 decimal_digit;
typedef struct st_decimal {
@@ -50,7 +50,7 @@ int decimal_cmp(decimal *from1, decimal *from2);
int decimal_mul(decimal *from1, decimal *from2, decimal *to);
int decimal_div(decimal *from1, decimal *from2, decimal *to, int scale_incr);
int decimal_mod(decimal *from1, decimal *from2, decimal *to);
int decimal_round(decimal *from, decimal *to, int new_scale, dec_round_mode mode);
int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode mode);
/*
the following works only on special "zero" decimal, not on any