![]() |
libgpac
Documentation of the core library of GPAC
|
#include <stdlib.h>#include <stdio.h>#include <stdarg.h>#include <inttypes.h>#include <string.h>#include <assert.h>#include <ctype.h>#include <sys/time.h>#include <math.h>#include <setjmp.h>#include "cutils.h"#include "dtoa.h"
Include dependency graph for dtoa.c:Data Structures | |
| struct | mpb_t |
Macros | |
| #define | USE_POW5_TABLE |
| #define | USE_FAST_INT |
| #define | LIMB_LOG2_BITS 5 |
| #define | LIMB_BITS (1 << LIMB_LOG2_BITS) |
| #define | LIMB_DIGITS 9 |
| #define | JS_RADIX_MAX 36 |
| #define | DBIGNUM_LEN_MAX 52 /* ~ 2^(1072+53)*36^100 (dtoa) */ |
| #define | MANT_LEN_MAX 18 /* < 36^100 */ |
| #define | MUL_LOG2_RADIX_BASE_LOG2 24 |
Typedefs | |
| typedef int32_t | slimb_t |
| typedef uint32_t | limb_t |
| typedef uint64_t | dlimb_t |
| typedef intptr_t | mp_size_t |
Enumerations | |
| enum | { JS_RNDN , JS_RNDNA , JS_RNDZ } |
Functions | |
| static limb_t | mp_add_ui (limb_t *tab, limb_t b, size_t n) |
| static limb_t | mp_mul1 (limb_t *tabr, const limb_t *taba, limb_t n, limb_t b, limb_t l) |
| static limb_t | udiv1norm_init (limb_t d) |
| static limb_t | udiv1norm (limb_t *pr, limb_t a1, limb_t a0, limb_t d, limb_t d_inv) |
| static limb_t | mp_div1 (limb_t *tabr, const limb_t *taba, limb_t n, limb_t b, limb_t r) |
| static limb_t | mp_shr (limb_t *tab_r, const limb_t *tab, mp_size_t n, int shift, limb_t high) |
| static limb_t | mp_shl (limb_t *tab_r, const limb_t *tab, mp_size_t n, int shift, limb_t low) |
| static no_inline limb_t | mp_div1norm (limb_t *tabr, const limb_t *taba, limb_t n, limb_t b, limb_t r, limb_t b_inv, int shift) |
| static __maybe_unused void | mpb_dump (const char *str, const mpb_t *a) |
| static void | mpb_renorm (mpb_t *r) |
| static uint64_t | pow_ui (uint32_t a, uint32_t b) |
| static uint32_t | pow_ui_inv (uint32_t *pr_inv, int *pshift, uint32_t a, uint32_t b) |
| static int | mpb_get_bit (const mpb_t *r, int k) |
| static void | mpb_shr_round (mpb_t *r, int shift, int rnd_mode) |
| static int | mpb_cmp (const mpb_t *a, const mpb_t *b) |
| static void | mpb_set_u64 (mpb_t *r, uint64_t m) |
| static uint64_t | mpb_get_u64 (mpb_t *r) |
| static int | mpb_floor_log2 (mpb_t *a) |
| static int | mul_log2_radix (int a, int radix) |
| static void | u32toa_len (char *buf, uint32_t n, size_t len) |
| static void | u64toa_bin_len (char *buf, uint64_t n, unsigned int radix_bits, int len) |
| static void | limb_to_a (char *buf, limb_t n, unsigned int radix, int len) |
| size_t | u32toa (char *buf, uint32_t n) |
| size_t | i32toa (char *buf, int32_t n) |
| size_t | u64toa (char *buf, uint64_t n) |
| size_t | i64toa (char *buf, int64_t n) |
| size_t | u64toa_radix (char *buf, uint64_t n, unsigned int radix) |
| size_t | i64toa_radix (char *buf, int64_t n, unsigned int radix) |
| static int | output_digits (char *buf, mpb_t *a, int radix, int n_digits1, int dot_pos) |
| static int | mul_pow (mpb_t *a, int radix1, int radix_shift, int f, BOOL is_int, int e) |
| static void | mul_pow_round (mpb_t *tmp1, uint64_t m, int e, int radix1, int radix_shift, int f, int rnd_mode) |
| static uint64_t | round_to_d (int *pe, mpb_t *a, int e_offset, int rnd_mode) |
| static uint64_t | mul_pow_round_to_d (int *pe, mpb_t *a, int radix1, int radix_shift, int f, int rnd_mode) |
| int | js_dtoa_max_len (double d, int radix, int n_digits, int flags) |
| static void * | dtoa_malloc (uint64_t **pptr, size_t size) |
| static void | dtoa_free (void *ptr) |
| int | js_dtoa (char *buf, double d, int radix, int n_digits, int flags, JSDTOATempMem *tmp_mem) |
| static int | to_digit (int c) |
| static void | mpb_mul1_base (mpb_t *r, limb_t radix_base, limb_t a) |
| double | js_atod (const char *str, const char **pnext, int radix, int flags, JSATODTempMem *tmp_mem) |
Variables | |
| static const uint32_t | pow5_table [17] |
| static const uint8_t | pow5h_table [4] |
| static const uint32_t | pow5_inv_table [13] |
| static const uint32_t | mul_log2_radix_table [JS_RADIX_MAX - 1] |
| static const uint8_t | digits_per_limb_table [JS_RADIX_MAX - 1] |
| static const uint32_t | radix_base_table [JS_RADIX_MAX - 1] |
| static uint8_t | dtoa_max_digits_table [JS_RADIX_MAX - 1] |
| static uint8_t | atod_max_digits_table [JS_RADIX_MAX - 1] |
| static const int16_t | max_exponent [JS_RADIX_MAX - 1] |
| static const int16_t | min_exponent [JS_RADIX_MAX - 1] |
| struct mpb_t |
| Data Fields | ||
|---|---|---|
| int | len | |
| limb_t | tab[] | |
| #define USE_POW5_TABLE |
| #define USE_FAST_INT |
| #define LIMB_LOG2_BITS 5 |
| #define LIMB_BITS (1 << LIMB_LOG2_BITS) |
| #define LIMB_DIGITS 9 |
| #define JS_RADIX_MAX 36 |
| #define DBIGNUM_LEN_MAX 52 /* ~ 2^(1072+53)*36^100 (dtoa) */ |
| #define MANT_LEN_MAX 18 /* < 36^100 */ |
| #define MUL_LOG2_RADIX_BASE_LOG2 24 |
| typedef intptr_t mp_size_t |
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| size_t u32toa | ( | char * | buf, |
| uint32_t | n | ||
| ) |
Here is the caller graph for this function:| size_t i32toa | ( | char * | buf, |
| int32_t | n | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| size_t u64toa | ( | char * | buf, |
| uint64_t | n | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| size_t i64toa | ( | char * | buf, |
| int64_t | n | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| size_t u64toa_radix | ( | char * | buf, |
| uint64_t | n, | ||
| unsigned int | radix | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| size_t i64toa_radix | ( | char * | buf, |
| int64_t | n, | ||
| unsigned int | radix | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| int js_dtoa_max_len | ( | double | d, |
| int | radix, | ||
| int | n_digits, | ||
| int | flags | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:| int js_dtoa | ( | char * | buf, |
| double | d, | ||
| int | radix, | ||
| int | n_digits, | ||
| int | flags, | ||
| JSDTOATempMem * | tmp_mem | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
Here is the call graph for this function:
Here is the caller graph for this function:| double js_atod | ( | const char * | str, |
| const char ** | pnext, | ||
| int | radix, | ||
| int | flags, | ||
| JSATODTempMem * | tmp_mem | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |