PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/shortest_dec.h"
#include "ryu_common.h"
#include "digit_table.h"
#include "d2s_full_table.h"
#include "d2s_intrinsics.h"
Go to the source code of this file.
Data Structures | |
struct | floating_decimal_64 |
Macros | |
#define | DOUBLE_MANTISSA_BITS 52 |
#define | DOUBLE_EXPONENT_BITS 11 |
#define | DOUBLE_BIAS 1023 |
#define | DOUBLE_POW5_INV_BITCOUNT 122 |
#define | DOUBLE_POW5_BITCOUNT 121 |
Typedefs | |
typedef struct floating_decimal_64 | floating_decimal_64 |
Functions | |
static uint32 | pow5Factor (uint64 value) |
static bool | multipleOfPowerOf5 (const uint64 value, const uint32 p) |
static bool | multipleOfPowerOf2 (const uint64 value, const uint32 p) |
static uint64 | mulShiftAll (uint64 m, const uint64 *const mul, const int32 j, uint64 *const vp, uint64 *const vm, const uint32 mmShift) |
static uint32 | decimalLength (const uint64 v) |
static floating_decimal_64 | d2d (const uint64 ieeeMantissa, const uint32 ieeeExponent) |
static int | to_chars_df (const floating_decimal_64 v, const uint32 olength, char *const result) |
static int | to_chars (floating_decimal_64 v, const bool sign, char *const result) |
static bool | d2d_small_int (const uint64 ieeeMantissa, const uint32 ieeeExponent, floating_decimal_64 *v) |
int | double_to_shortest_decimal_bufn (double f, char *result) |
int | double_to_shortest_decimal_buf (double f, char *result) |
char * | double_to_shortest_decimal (double f) |
typedef struct floating_decimal_64 floating_decimal_64 |
|
inlinestatic |
Definition at line 346 of file d2s.c.
References div10(), div100(), div5(), DOUBLE_BIAS, DOUBLE_MANTISSA_BITS, DOUBLE_POW5_BITCOUNT, DOUBLE_POW5_INV_BITCOUNT, DOUBLE_POW5_INV_SPLIT, DOUBLE_POW5_SPLIT, fd(), i, j, log10Pow2(), log10Pow5(), mulShiftAll(), multipleOfPowerOf2(), multipleOfPowerOf5(), output, and pow5bits().
Referenced by double_to_shortest_decimal_bufn().
|
inlinestatic |
Definition at line 962 of file d2s.c.
References DOUBLE_BIAS, DOUBLE_MANTISSA_BITS, floating_decimal_64::exponent, and floating_decimal_64::mantissa.
Referenced by double_to_shortest_decimal_bufn().
|
inlinestatic |
char* double_to_shortest_decimal | ( | double | f | ) |
Definition at line 1070 of file d2s.c.
References DOUBLE_SHORTEST_DECIMAL_LEN, double_to_shortest_decimal_buf(), and palloc().
int double_to_shortest_decimal_buf | ( | double | f, |
char * | result | ||
) |
Definition at line 1053 of file d2s.c.
References Assert, DOUBLE_SHORTEST_DECIMAL_LEN, and double_to_shortest_decimal_bufn().
Referenced by double_to_shortest_decimal(), float8out_internal(), and outDouble().
int double_to_shortest_decimal_bufn | ( | double | f, |
char * | result | ||
) |
Definition at line 1015 of file d2s.c.
References copy_special_str(), d2d(), d2d_small_int(), DOUBLE_EXPONENT_BITS, DOUBLE_MANTISSA_BITS, double_to_bits(), and to_chars().
Referenced by double_to_shortest_decimal_buf().
|
inlinestatic |
Definition at line 220 of file d2s.c.
References j, shiftright128(), and umul128().
Referenced by d2d().
|
inlinestatic |
|
inlinestatic |
Definition at line 787 of file d2s.c.
References decimalLength(), DIGIT_TABLE, div10(), div1e8(), floating_decimal_64::exponent, i, floating_decimal_64::mantissa, output, sign, and to_chars_df().
Referenced by double_to_shortest_decimal_bufn().
|
inlinestatic |
Definition at line 631 of file d2s.c.
References Assert, DIGIT_TABLE, div1e8(), floating_decimal_64::exponent, i, floating_decimal_64::mantissa, and output.
Referenced by to_chars().