File numeric_opfunc.h¶
FileList > cubrid > src > query > numeric_opfunc.h
Go to the source code of this file
#include "config.h"#include "intl_support.h"#include "dbtype_def.h"#include "error_manager.h"#include "byte_order.h"#include <x86intrin.h>
Public Types¶
| Type | Name |
|---|---|
| enum | DB_DATA_STATUS |
| typedef uint64_t | knuth_digit_t |
| typedef uint128_t | knuth_double_digit_t |
| typedef __uint128_t | uint128_t |
Public Functions¶
Macros¶
| Type | Name |
|---|---|
| define | FIXED_TO_FLOAT_NUMERIC (value) /* multi line expression */ |
| define | FLOAT_TO_FIXED_NUMERIC (value) /* multi line expression */ |
| define | KNUTH_BASE (([**knuth\_double\_digit\_t**](numeric__opfunc_8h.md#typedef-knuth_double_digit_t))1 << 64) |
| define | KNUTH_DIGIT_BITS (64) |
| define | MILLISECONDS_OF_ONE_DAY 86400000 /\* 24 \* 60 \* 60 \* 1000 \*/ |
| define | NUMERIC_BSWAP32 (x) [**\_\_builtin\_bswap32**](broker__monitor_8c.md#function-timeout)([**x**](broker__monitor_8c.md#function-timeout)) |
| define | NUMERIC_BSWAP64 (x) [**\_\_builtin\_bswap64**](broker__monitor_8c.md#function-timeout)([**x**](broker__monitor_8c.md#function-timeout)) |
| define | NUMERIC_CLZ (x) [**NUMERIC\_CLZ64**](numeric__opfunc_8h.md#define-numeric_clz64)([**x**](broker__monitor_8c.md#function-timeout)) |
| define | NUMERIC_CLZ32 (x) (([**x**](broker__monitor_8c.md#function-timeout)) ? [**\_\_builtin\_clz**](broker__monitor_8c.md#function-timeout)([**x**](broker__monitor_8c.md#function-timeout)) : 32) |
| define | NUMERIC_CLZ64 (x) (([**x**](broker__monitor_8c.md#function-timeout)) ? [**\_\_builtin\_clzll**](broker__monitor_8c.md#function-timeout)([**x**](broker__monitor_8c.md#function-timeout)) : 64) |
| define | NUMERIC_CTZ64 (x) (([**x**](broker__monitor_8c.md#function-timeout)) ? [**\_\_builtin\_ctzll**](broker__monitor_8c.md#function-timeout)([**x**](broker__monitor_8c.md#function-timeout)) : 64) |
| define | NUMERIC_HEADER_SCALE_SIGN_BIT_MASK 0x80 |
| define | NUMERIC_MAX_STRING_SIZE ((([**DB\_MAX\_NUMERIC\_PRECISION**](dbtype__def_8h.md#define-db_max_numeric_precision) - [**DB\_MIN\_NUMERIC\_SCALE**](dbtype__def_8h.md#define-db_min_numeric_scale)) + 2) \* 2) |
| define | NUMERIC_VALUE_SIGN_BIT_MASK 0x80 |
| define | SECONDS_OF_ONE_DAY 86400 /\* 24 \* 60 \* 60 \*/ |
| define | db_locate_numeric (value) (([**DB\_C\_NUMERIC**](dbtype__def_8h.md#typedef-db_c_numeric)) ((value)->data.num.d.buf)) |
Public Types Documentation¶
enum DB_DATA_STATUS¶
enum DB_DATA_STATUS {
DATA_STATUS_OK = 0,
DATA_STATUS_TRUNCATED = 1004,
DATA_STATUS_NOT_CONSUMED = 1005
};
typedef knuth_digit_t¶
typedef knuth_double_digit_t¶
typedef uint128_t¶
Public Functions Documentation¶
function float_numeric_db_value_add¶
function float_numeric_db_value_div¶
function float_numeric_db_value_mod¶
int float_numeric_db_value_mod (
const DB_VALUE * value1,
const DB_VALUE * value2,
DB_VALUE * result
)
function float_numeric_db_value_mul¶
function float_numeric_db_value_sub¶
function float_numeric_normalize_for_hash¶
void float_numeric_normalize_for_hash (
DB_C_NUMERIC num,
uint8_t * calc_buf,
int precision,
int scale
)
function numeric_coerce_bigint_to_num¶
function numeric_coerce_dec_str_to_num¶
void numeric_coerce_dec_str_to_num (
const char * dec_str,
DB_C_NUMERIC result,
bool * is_value_negative
)
function numeric_coerce_int_to_num¶
function numeric_coerce_num_to_bigint¶
int numeric_coerce_num_to_bigint (
DB_C_NUMERIC arg,
int scale,
DB_BIGINT * answer,
const bool is_value_negative
)
function numeric_coerce_num_to_dec_str¶
function numeric_coerce_num_to_double¶
function numeric_coerce_num_to_int¶
function numeric_coerce_num_to_num¶
int numeric_coerce_num_to_num (
const DB_VALUE * src_value,
int src_prec,
int src_scale,
int dest_prec,
int dest_scale,
DB_C_NUMERIC dest_num,
bool * dest_num_is_negative
)
function numeric_coerce_string_to_num¶
int numeric_coerce_string_to_num (
const char * astring,
int astring_len,
INTL_CODESET codeset,
DB_VALUE * num
)
function numeric_db_value_add¶
function numeric_db_value_coerce_from_num¶
int numeric_db_value_coerce_from_num (
DB_VALUE * src,
DB_VALUE * dest,
DB_DATA_STATUS * data_stat
)
function numeric_db_value_coerce_from_num_strict¶
function numeric_db_value_coerce_to_num¶
function numeric_db_value_compare¶
function numeric_db_value_div¶
function numeric_db_value_is_positive¶
function numeric_db_value_is_zero¶
function numeric_db_value_mul¶
function numeric_db_value_print¶
function numeric_db_value_sub¶
function numeric_get_precision_digits¶
function numeric_internal_double_to_num¶
int numeric_internal_double_to_num (
double adouble,
int dst_scale,
DB_C_NUMERIC num,
int * prec,
int * scale,
bool * is_value_negative
)
function numeric_internal_float_to_num¶
int numeric_internal_float_to_num (
float afloat,
int dst_scale,
DB_C_NUMERIC num,
int * prec,
int * scale,
bool * is_value_negative
)
Macro Definition Documentation¶
define FIXED_TO_FLOAT_NUMERIC¶
define FLOAT_TO_FIXED_NUMERIC¶
define KNUTH_BASE¶
define KNUTH_DIGIT_BITS¶
define MILLISECONDS_OF_ONE_DAY¶
define NUMERIC_BSWAP32¶
define NUMERIC_BSWAP64¶
define NUMERIC_CLZ¶
define NUMERIC_CLZ32¶
define NUMERIC_CLZ64¶
define NUMERIC_CTZ64¶
define NUMERIC_HEADER_SCALE_SIGN_BIT_MASK¶
define NUMERIC_MAX_STRING_SIZE¶
define NUMERIC_VALUE_SIGN_BIT_MASK¶
define SECONDS_OF_ONE_DAY¶
define db_locate_numeric¶
The documentation for this class was generated from the following file cubrid/src/query/numeric_opfunc.h