|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Classes | |
| struct | DiyFp |
| struct | CachedPower |
| struct | grisu_context |
| grisu_context holds the configuration for formatting More... | |
Functions | |
| CachedPower | GetCachedPower (int e, int *K) |
| bool | DigitGen (const DiyFp &W, const DiyFp &Mp, uint64_t delta, char *buffer, int *len, int *K) |
| bool | Grisu3 (uint64_t significand, int exponent, char *buffer, int *length, int *K) |
| std::string | FormatGrisu3 (bool sign, const char *digits, int len, int K, const grisu_context &ctx) |
| int | cached_pow_grisu (int exp, DiyFp *p) |
| DiyFp | minus_diyf (DiyFp x, DiyFp y) |
| DiyFp | multiply_diyf (DiyFp x, DiyFp y) |
| DiyFp | normalize_diy_fp (DiyFp n) |
| DiyFp | double2diy_fp (double d) |
| int | largest_pow10 (uint32_t n, int n_bits, uint32_t *power) |
| bool | round_weed (char *buffer, int len, uint64_t wp_W, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t ulp) |
| bool | digit_gen_grisu (DiyFp low, DiyFp w, DiyFp high, char *buffer, int *length, int *kappa) |
| bool | grisu3_mathgeolib (double v, char *buffer, int *length, int *d_exp) |
| std::string | format_grisu3_output (bool negative, const char *buffer, int length, int d_exp) |
| uint64_t | decimal_to_uint64_normalized (const support::decimal &mantissa, int &shift_out) |
| std::string | to_decimal_string (bool sign, int scale, const support::decimal &mantissa, int fbits, std::ios_base::fmtflags flags=std::ios_base::dec, std::streamsize precision=6) |
Variables | |
| static const CachedPower | kCachedPowers [] |
| static const int | kCachedPowersSize = sizeof(kCachedPowers) / sizeof(kCachedPowers[0]) |
| constexpr uint64_t | D64_SIGN = 0x8000000000000000ULL |
| constexpr uint64_t | D64_EXP_MASK = 0x7FF0000000000000ULL |
| constexpr uint64_t | D64_FRACT_MASK = 0x000FFFFFFFFFFFFFULL |
| constexpr uint64_t | D64_IMPLICIT_ONE = 0x0010000000000000ULL |
| constexpr int | D64_EXP_POS = 52 |
| constexpr int | D64_EXP_BIAS = 1075 |
| constexpr int | DIYFP_FRACT_SIZE = 64 |
| constexpr double | D_1_LOG2_10 = 0.30102999566398114 |
| constexpr int | MIN_TARGET_EXP = -60 |
| constexpr uint64_t | MASK32 = 0xFFFFFFFFULL |
| constexpr int | MIN_CACHED_EXP = -348 |
| constexpr int | CACHED_EXP_STEP = 8 |
| static const uint32_t | pow10_cache [] |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
static |
|
static |
|
constexpr |
|
constexpr |
|
constexpr |
|
static |