libgpac
Documentation of the core library of GPAC
libbf.h File Reference
#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for libbf.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  bf_t
 
struct  bfdec_t
 
struct  BFConstCache
 
struct  bf_context_t
 

Macros

#define LIMB_LOG2_BITS   6
 
#define LIMB_BITS   (1 << LIMB_LOG2_BITS)
 
#define BF_RAW_EXP_MIN   INT64_MIN
 
#define BF_RAW_EXP_MAX   INT64_MAX
 
#define LIMB_DIGITS   19
 
#define BF_DEC_BASE   UINT64_C(10000000000000000000)
 
#define BF_EXP_BITS_MIN   3
 
#define BF_EXP_BITS_MAX   (LIMB_BITS - 3)
 
#define BF_EXT_EXP_BITS_MAX   (BF_EXP_BITS_MAX + 1)
 
#define BF_PREC_MIN   2
 
#define BF_PREC_MAX   (((limb_t)1 << (LIMB_BITS - 2)) - 2)
 
#define BF_PREC_INF   (BF_PREC_MAX + 1) /* infinite precision */
 
#define BF_CHKSUM_MOD   (UINT64_C(975620677) * UINT64_C(9795002197))
 
#define BF_EXP_ZERO   BF_RAW_EXP_MIN
 
#define BF_EXP_INF   (BF_RAW_EXP_MAX - 1)
 
#define BF_EXP_NAN   BF_RAW_EXP_MAX
 
#define BF_FLAG_SUBNORMAL   (1 << 3)
 
#define BF_FLAG_RADPNT_PREC   (1 << 4)
 
#define BF_RND_MASK   0x7
 
#define BF_EXP_BITS_SHIFT   5
 
#define BF_EXP_BITS_MASK   0x3f
 
#define BF_FLAG_EXT_EXP   (BF_EXP_BITS_MASK << BF_EXP_BITS_SHIFT)
 
#define BF_ST_INVALID_OP   (1 << 0)
 
#define BF_ST_DIVIDE_ZERO   (1 << 1)
 
#define BF_ST_OVERFLOW   (1 << 2)
 
#define BF_ST_UNDERFLOW   (1 << 3)
 
#define BF_ST_INEXACT   (1 << 4)
 
#define BF_ST_MEM_ERROR   (1 << 5)
 
#define BF_RADIX_MAX   36 /* maximum radix for bf_atof() and bf_ftoa() */
 
#define BF_DIVREM_EUCLIDIAN   BF_RNDF
 
#define BF_ATOF_NO_HEX   (1 << 16)
 
#define BF_ATOF_BIN_OCT   (1 << 17)
 
#define BF_ATOF_NO_NAN_INF   (1 << 18)
 
#define BF_ATOF_EXPONENT   (1 << 19)
 
#define BF_FTOA_FORMAT_MASK   (3 << 16)
 
#define BF_FTOA_FORMAT_FIXED   (0 << 16)
 
#define BF_FTOA_FORMAT_FRAC   (1 << 16)
 
#define BF_FTOA_FORMAT_FREE   (2 << 16)
 
#define BF_FTOA_FORMAT_FREE_MIN   (3 << 16)
 
#define BF_FTOA_FORCE_EXP   (1 << 20)
 
#define BF_FTOA_ADD_PREFIX   (1 << 21)
 
#define BF_FTOA_JS_QUIRKS   (1 << 22)
 
#define BF_GET_INT_MOD   (1 << 0)
 
#define BF_POW_JS_QUIRKS   (1 << 16) /* (+/-1)^(+/-Inf) = NaN, 1^NaN = NaN */
 

Typedefs

typedef __int128 int128_t
 
typedef unsigned __int128 uint128_t
 
typedef int64_t slimb_t
 
typedef uint64_t limb_t
 
typedef uint128_t dlimb_t
 
typedef uint32_t bf_flags_t
 
typedef void * bf_realloc_func_t(void *opaque, void *ptr, size_t size)
 

Enumerations

enum  bf_rnd_t {
  BF_RNDN , BF_RNDZ , BF_RNDD , BF_RNDU ,
  BF_RNDNA , BF_RNDA , BF_RNDF
}
 

Functions

static int bf_get_exp_bits (bf_flags_t flags)
 
static bf_flags_t bf_set_exp_bits (int n)
 
static slimb_t bf_max (slimb_t a, slimb_t b)
 
static slimb_t bf_min (slimb_t a, slimb_t b)
 
void bf_context_init (bf_context_t *s, bf_realloc_func_t *realloc_func, void *realloc_opaque)
 
void bf_context_end (bf_context_t *s)
 
void bf_clear_cache (bf_context_t *s)
 
static void * bf_realloc (bf_context_t *s, void *ptr, size_t size)
 
static void * bf_malloc (bf_context_t *s, size_t size)
 
static void bf_free (bf_context_t *s, void *ptr)
 
void bf_init (bf_context_t *s, bf_t *r)
 
static void bf_delete (bf_t *r)
 
static void bf_neg (bf_t *r)
 
static int bf_is_finite (const bf_t *a)
 
static int bf_is_nan (const bf_t *a)
 
static int bf_is_zero (const bf_t *a)
 
static void bf_memcpy (bf_t *r, const bf_t *a)
 
int bf_set_ui (bf_t *r, uint64_t a)
 
int bf_set_si (bf_t *r, int64_t a)
 
void bf_set_nan (bf_t *r)
 
void bf_set_zero (bf_t *r, int is_neg)
 
void bf_set_inf (bf_t *r, int is_neg)
 
int bf_set (bf_t *r, const bf_t *a)
 
void bf_move (bf_t *r, bf_t *a)
 
int bf_get_float64 (const bf_t *a, double *pres, bf_rnd_t rnd_mode)
 
int bf_set_float64 (bf_t *a, double d)
 
int bf_cmpu (const bf_t *a, const bf_t *b)
 
int bf_cmp_full (const bf_t *a, const bf_t *b)
 
int bf_cmp (const bf_t *a, const bf_t *b)
 
static int bf_cmp_eq (const bf_t *a, const bf_t *b)
 
static int bf_cmp_le (const bf_t *a, const bf_t *b)
 
static int bf_cmp_lt (const bf_t *a, const bf_t *b)
 
int bf_add (bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags)
 
int bf_sub (bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags)
 
int bf_add_si (bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags)
 
int bf_mul (bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags)
 
int bf_mul_ui (bf_t *r, const bf_t *a, uint64_t b1, limb_t prec, bf_flags_t flags)
 
int bf_mul_si (bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags)
 
int bf_mul_2exp (bf_t *r, slimb_t e, limb_t prec, bf_flags_t flags)
 
int bf_div (bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags)
 
int bf_divrem (bf_t *q, bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode)
 
int bf_rem (bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode)
 
int bf_remquo (slimb_t *pq, bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode)
 
int bf_rint (bf_t *r, int rnd_mode)
 
int bf_round (bf_t *r, limb_t prec, bf_flags_t flags)
 
int bf_sqrtrem (bf_t *r, bf_t *rem1, const bf_t *a)
 
int bf_sqrt (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
slimb_t bf_get_exp_min (const bf_t *a)
 
int bf_logic_or (bf_t *r, const bf_t *a, const bf_t *b)
 
int bf_logic_xor (bf_t *r, const bf_t *a, const bf_t *b)
 
int bf_logic_and (bf_t *r, const bf_t *a, const bf_t *b)
 
int bf_atof (bf_t *a, const char *str, const char **pnext, int radix, limb_t prec, bf_flags_t flags)
 
int bf_atof2 (bf_t *r, slimb_t *pexponent, const char *str, const char **pnext, int radix, limb_t prec, bf_flags_t flags)
 
int bf_mul_pow_radix (bf_t *r, const bf_t *T, limb_t radix, slimb_t expn, limb_t prec, bf_flags_t flags)
 
char * bf_ftoa (size_t *plen, const bf_t *a, int radix, limb_t prec, bf_flags_t flags)
 
int bf_get_int32 (int *pres, const bf_t *a, int flags)
 
int bf_get_int64 (int64_t *pres, const bf_t *a, int flags)
 
int bf_get_uint64 (uint64_t *pres, const bf_t *a)
 
void mp_print_str (const char *str, const limb_t *tab, limb_t n)
 
void bf_print_str (const char *str, const bf_t *a)
 
int bf_resize (bf_t *r, limb_t len)
 
int bf_get_fft_size (int *pdpl, int *pnb_mods, limb_t len)
 
int bf_normalize_and_round (bf_t *r, limb_t prec1, bf_flags_t flags)
 
int bf_can_round (const bf_t *a, slimb_t prec, bf_rnd_t rnd_mode, slimb_t k)
 
slimb_t bf_mul_log2_radix (slimb_t a1, unsigned int radix, int is_inv, int is_ceil1)
 
int mp_mul (bf_context_t *s, limb_t *result, const limb_t *op1, limb_t op1_size, const limb_t *op2, limb_t op2_size)
 
limb_t mp_add (limb_t *res, const limb_t *op1, const limb_t *op2, limb_t n, limb_t carry)
 
limb_t mp_add_ui (limb_t *tab, limb_t b, size_t n)
 
int mp_sqrtrem (bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
 
int mp_recip (bf_context_t *s, limb_t *tabr, const limb_t *taba, limb_t n)
 
limb_t bf_isqrt (limb_t a)
 
int bf_const_log2 (bf_t *T, limb_t prec, bf_flags_t flags)
 
int bf_const_pi (bf_t *T, limb_t prec, bf_flags_t flags)
 
int bf_exp (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_log (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_pow (bf_t *r, const bf_t *x, const bf_t *y, limb_t prec, bf_flags_t flags)
 
int bf_cos (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_sin (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_tan (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_atan (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_atan2 (bf_t *r, const bf_t *y, const bf_t *x, limb_t prec, bf_flags_t flags)
 
int bf_asin (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
int bf_acos (bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
 
static void bfdec_init (bf_context_t *s, bfdec_t *r)
 
static void bfdec_delete (bfdec_t *r)
 
static void bfdec_neg (bfdec_t *r)
 
static int bfdec_is_finite (const bfdec_t *a)
 
static int bfdec_is_nan (const bfdec_t *a)
 
static int bfdec_is_zero (const bfdec_t *a)
 
static void bfdec_memcpy (bfdec_t *r, const bfdec_t *a)
 
int bfdec_set_ui (bfdec_t *r, uint64_t a)
 
int bfdec_set_si (bfdec_t *r, int64_t a)
 
static void bfdec_set_nan (bfdec_t *r)
 
static void bfdec_set_zero (bfdec_t *r, int is_neg)
 
static void bfdec_set_inf (bfdec_t *r, int is_neg)
 
static int bfdec_set (bfdec_t *r, const bfdec_t *a)
 
static void bfdec_move (bfdec_t *r, bfdec_t *a)
 
static int bfdec_cmpu (const bfdec_t *a, const bfdec_t *b)
 
static int bfdec_cmp_full (const bfdec_t *a, const bfdec_t *b)
 
static int bfdec_cmp (const bfdec_t *a, const bfdec_t *b)
 
static int bfdec_cmp_eq (const bfdec_t *a, const bfdec_t *b)
 
static int bfdec_cmp_le (const bfdec_t *a, const bfdec_t *b)
 
static int bfdec_cmp_lt (const bfdec_t *a, const bfdec_t *b)
 
int bfdec_add (bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags)
 
int bfdec_sub (bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags)
 
int bfdec_add_si (bfdec_t *r, const bfdec_t *a, int64_t b1, limb_t prec, bf_flags_t flags)
 
int bfdec_mul (bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags)
 
int bfdec_mul_si (bfdec_t *r, const bfdec_t *a, int64_t b1, limb_t prec, bf_flags_t flags)
 
int bfdec_div (bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags)
 
int bfdec_divrem (bfdec_t *q, bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags, int rnd_mode)
 
int bfdec_rem (bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags, int rnd_mode)
 
int bfdec_rint (bfdec_t *r, int rnd_mode)
 
int bfdec_sqrt (bfdec_t *r, const bfdec_t *a, limb_t prec, bf_flags_t flags)
 
int bfdec_round (bfdec_t *r, limb_t prec, bf_flags_t flags)
 
int bfdec_get_int32 (int *pres, const bfdec_t *a)
 
int bfdec_pow_ui (bfdec_t *r, const bfdec_t *a, limb_t b)
 
char * bfdec_ftoa (size_t *plen, const bfdec_t *a, limb_t prec, bf_flags_t flags)
 
int bfdec_atof (bfdec_t *r, const char *str, const char **pnext, limb_t prec, bf_flags_t flags)
 
void bfdec_print_str (const char *str, const bfdec_t *a)
 
static int bfdec_resize (bfdec_t *r, limb_t len)
 
int bfdec_normalize_and_round (bfdec_t *r, limb_t prec1, bf_flags_t flags)
 

Variables

const limb_t mp_pow_dec [LIMB_DIGITS+1]
 

Data Structure Documentation

◆ bf_t

struct bf_t
+ Collaboration diagram for bf_t:
Data Fields
struct bf_context_t * ctx
int sign
slimb_t expn
limb_t len
limb_t * tab

◆ bfdec_t

struct bfdec_t
+ Collaboration diagram for bfdec_t:
Data Fields
struct bf_context_t * ctx
int sign
slimb_t expn
limb_t len
limb_t * tab

◆ BFConstCache

struct BFConstCache
+ Collaboration diagram for BFConstCache:
Data Fields
bf_t val
limb_t prec

◆ bf_context_t

struct bf_context_t
+ Collaboration diagram for bf_context_t:
Data Fields
void * realloc_opaque
bf_realloc_func_t * realloc_func
BFConstCache log2_cache
BFConstCache pi_cache
struct BFNTTState * ntt_state

Macro Definition Documentation

◆ LIMB_LOG2_BITS

#define LIMB_LOG2_BITS   6

◆ LIMB_BITS

#define LIMB_BITS   (1 << LIMB_LOG2_BITS)

◆ BF_RAW_EXP_MIN

#define BF_RAW_EXP_MIN   INT64_MIN

◆ BF_RAW_EXP_MAX

#define BF_RAW_EXP_MAX   INT64_MAX

◆ LIMB_DIGITS

#define LIMB_DIGITS   19

◆ BF_DEC_BASE

#define BF_DEC_BASE   UINT64_C(10000000000000000000)

◆ BF_EXP_BITS_MIN

#define BF_EXP_BITS_MIN   3

◆ BF_EXP_BITS_MAX

#define BF_EXP_BITS_MAX   (LIMB_BITS - 3)

◆ BF_EXT_EXP_BITS_MAX

#define BF_EXT_EXP_BITS_MAX   (BF_EXP_BITS_MAX + 1)

◆ BF_PREC_MIN

#define BF_PREC_MIN   2

◆ BF_PREC_MAX

#define BF_PREC_MAX   (((limb_t)1 << (LIMB_BITS - 2)) - 2)

◆ BF_PREC_INF

#define BF_PREC_INF   (BF_PREC_MAX + 1) /* infinite precision */

◆ BF_CHKSUM_MOD

#define BF_CHKSUM_MOD   (UINT64_C(975620677) * UINT64_C(9795002197))

◆ BF_EXP_ZERO

#define BF_EXP_ZERO   BF_RAW_EXP_MIN

◆ BF_EXP_INF

#define BF_EXP_INF   (BF_RAW_EXP_MAX - 1)

◆ BF_EXP_NAN

#define BF_EXP_NAN   BF_RAW_EXP_MAX

◆ BF_FLAG_SUBNORMAL

#define BF_FLAG_SUBNORMAL   (1 << 3)

◆ BF_FLAG_RADPNT_PREC

#define BF_FLAG_RADPNT_PREC   (1 << 4)

◆ BF_RND_MASK

#define BF_RND_MASK   0x7

◆ BF_EXP_BITS_SHIFT

#define BF_EXP_BITS_SHIFT   5

◆ BF_EXP_BITS_MASK

#define BF_EXP_BITS_MASK   0x3f

◆ BF_FLAG_EXT_EXP

#define BF_FLAG_EXT_EXP   (BF_EXP_BITS_MASK << BF_EXP_BITS_SHIFT)

◆ BF_ST_INVALID_OP

#define BF_ST_INVALID_OP   (1 << 0)

◆ BF_ST_DIVIDE_ZERO

#define BF_ST_DIVIDE_ZERO   (1 << 1)

◆ BF_ST_OVERFLOW

#define BF_ST_OVERFLOW   (1 << 2)

◆ BF_ST_UNDERFLOW

#define BF_ST_UNDERFLOW   (1 << 3)

◆ BF_ST_INEXACT

#define BF_ST_INEXACT   (1 << 4)

◆ BF_ST_MEM_ERROR

#define BF_ST_MEM_ERROR   (1 << 5)

◆ BF_RADIX_MAX

#define BF_RADIX_MAX   36 /* maximum radix for bf_atof() and bf_ftoa() */

◆ BF_DIVREM_EUCLIDIAN

#define BF_DIVREM_EUCLIDIAN   BF_RNDF

◆ BF_ATOF_NO_HEX

#define BF_ATOF_NO_HEX   (1 << 16)

◆ BF_ATOF_BIN_OCT

#define BF_ATOF_BIN_OCT   (1 << 17)

◆ BF_ATOF_NO_NAN_INF

#define BF_ATOF_NO_NAN_INF   (1 << 18)

◆ BF_ATOF_EXPONENT

#define BF_ATOF_EXPONENT   (1 << 19)

◆ BF_FTOA_FORMAT_MASK

#define BF_FTOA_FORMAT_MASK   (3 << 16)

◆ BF_FTOA_FORMAT_FIXED

#define BF_FTOA_FORMAT_FIXED   (0 << 16)

◆ BF_FTOA_FORMAT_FRAC

#define BF_FTOA_FORMAT_FRAC   (1 << 16)

◆ BF_FTOA_FORMAT_FREE

#define BF_FTOA_FORMAT_FREE   (2 << 16)

◆ BF_FTOA_FORMAT_FREE_MIN

#define BF_FTOA_FORMAT_FREE_MIN   (3 << 16)

◆ BF_FTOA_FORCE_EXP

#define BF_FTOA_FORCE_EXP   (1 << 20)

◆ BF_FTOA_ADD_PREFIX

#define BF_FTOA_ADD_PREFIX   (1 << 21)

◆ BF_FTOA_JS_QUIRKS

#define BF_FTOA_JS_QUIRKS   (1 << 22)

◆ BF_GET_INT_MOD

#define BF_GET_INT_MOD   (1 << 0)

◆ BF_POW_JS_QUIRKS

#define BF_POW_JS_QUIRKS   (1 << 16) /* (+/-1)^(+/-Inf) = NaN, 1^NaN = NaN */

Typedef Documentation

◆ int128_t

typedef __int128 int128_t

◆ uint128_t

typedef unsigned __int128 uint128_t

◆ slimb_t

typedef int64_t slimb_t

◆ limb_t

typedef uint64_t limb_t

◆ dlimb_t

typedef uint128_t dlimb_t

◆ bf_flags_t

◆ bf_realloc_func_t

typedef void* bf_realloc_func_t(void *opaque, void *ptr, size_t size)

Enumeration Type Documentation

◆ bf_rnd_t

enum bf_rnd_t
Enumerator
BF_RNDN 
BF_RNDZ 
BF_RNDD 
BF_RNDU 
BF_RNDNA 
BF_RNDA 
BF_RNDF 

Function Documentation

◆ bf_get_exp_bits()

static int bf_get_exp_bits ( bf_flags_t  flags)
static
+ Here is the caller graph for this function:

◆ bf_set_exp_bits()

static bf_flags_t bf_set_exp_bits ( int  n)
static
+ Here is the caller graph for this function:

◆ bf_max()

static slimb_t bf_max ( slimb_t  a,
slimb_t  b 
)
static
+ Here is the caller graph for this function:

◆ bf_min()

static slimb_t bf_min ( slimb_t  a,
slimb_t  b 
)
static
+ Here is the caller graph for this function:

◆ bf_context_init()

void bf_context_init ( bf_context_t s,
bf_realloc_func_t realloc_func,
void *  realloc_opaque 
)
+ Here is the caller graph for this function:

◆ bf_context_end()

void bf_context_end ( bf_context_t s)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_clear_cache()

void bf_clear_cache ( bf_context_t s)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_realloc()

static void* bf_realloc ( bf_context_t s,
void *  ptr,
size_t  size 
)
static
+ Here is the caller graph for this function:

◆ bf_malloc()

static void* bf_malloc ( bf_context_t s,
size_t  size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_free()

static void bf_free ( bf_context_t s,
void *  ptr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_init()

void bf_init ( bf_context_t s,
bf_t r 
)
+ Here is the caller graph for this function:

◆ bf_delete()

static void bf_delete ( bf_t r)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_neg()

static void bf_neg ( bf_t r)
static
+ Here is the caller graph for this function:

◆ bf_is_finite()

static int bf_is_finite ( const bf_t a)
static
+ Here is the caller graph for this function:

◆ bf_is_nan()

static int bf_is_nan ( const bf_t a)
static
+ Here is the caller graph for this function:

◆ bf_is_zero()

static int bf_is_zero ( const bf_t a)
static
+ Here is the caller graph for this function:

◆ bf_memcpy()

static void bf_memcpy ( bf_t r,
const bf_t a 
)
static
+ Here is the caller graph for this function:

◆ bf_set_ui()

int bf_set_ui ( bf_t r,
uint64_t  a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set_si()

int bf_set_si ( bf_t r,
int64_t  a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set_nan()

void bf_set_nan ( bf_t r)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set_zero()

void bf_set_zero ( bf_t r,
int  is_neg 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set_inf()

void bf_set_inf ( bf_t r,
int  is_neg 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set()

int bf_set ( bf_t r,
const bf_t a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_move()

void bf_move ( bf_t r,
bf_t a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_float64()

int bf_get_float64 ( const bf_t a,
double *  pres,
bf_rnd_t  rnd_mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_set_float64()

int bf_set_float64 ( bf_t a,
double  d 
)
+ Here is the call graph for this function:

◆ bf_cmpu()

int bf_cmpu ( const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_cmp_full()

int bf_cmp_full ( const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_cmp()

int bf_cmp ( const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_cmp_eq()

static int bf_cmp_eq ( const bf_t a,
const bf_t b 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_cmp_le()

static int bf_cmp_le ( const bf_t a,
const bf_t b 
)
static
+ Here is the call graph for this function:

◆ bf_cmp_lt()

static int bf_cmp_lt ( const bf_t a,
const bf_t b 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_add()

int bf_add ( bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_sub()

int bf_sub ( bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_add_si()

int bf_add_si ( bf_t r,
const bf_t a,
int64_t  b1,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_mul()

int bf_mul ( bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_mul_ui()

int bf_mul_ui ( bf_t r,
const bf_t a,
uint64_t  b1,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_mul_si()

int bf_mul_si ( bf_t r,
const bf_t a,
int64_t  b1,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_mul_2exp()

int bf_mul_2exp ( bf_t r,
slimb_t  e,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_div()

int bf_div ( bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_divrem()

int bf_divrem ( bf_t q,
bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags,
int  rnd_mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_rem()

int bf_rem ( bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags,
int  rnd_mode 
)
+ Here is the call graph for this function:

◆ bf_remquo()

int bf_remquo ( slimb_t pq,
bf_t r,
const bf_t a,
const bf_t b,
limb_t  prec,
bf_flags_t  flags,
int  rnd_mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_rint()

int bf_rint ( bf_t r,
int  rnd_mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_round()

int bf_round ( bf_t r,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_sqrtrem()

int bf_sqrtrem ( bf_t r,
bf_t rem1,
const bf_t a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_sqrt()

int bf_sqrt ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_exp_min()

slimb_t bf_get_exp_min ( const bf_t a)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_logic_or()

int bf_logic_or ( bf_t r,
const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:

◆ bf_logic_xor()

int bf_logic_xor ( bf_t r,
const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:

◆ bf_logic_and()

int bf_logic_and ( bf_t r,
const bf_t a,
const bf_t b 
)
+ Here is the call graph for this function:

◆ bf_atof()

int bf_atof ( bf_t a,
const char *  str,
const char **  pnext,
int  radix,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_atof2()

int bf_atof2 ( bf_t r,
slimb_t pexponent,
const char *  str,
const char **  pnext,
int  radix,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_mul_pow_radix()

int bf_mul_pow_radix ( bf_t r,
const bf_t T,
limb_t  radix,
slimb_t  expn,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_ftoa()

char* bf_ftoa ( size_t *  plen,
const bf_t a,
int  radix,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_int32()

int bf_get_int32 ( int *  pres,
const bf_t a,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_int64()

int bf_get_int64 ( int64_t pres,
const bf_t a,
int  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_uint64()

int bf_get_uint64 ( uint64_t pres,
const bf_t a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp_print_str()

void mp_print_str ( const char *  str,
const limb_t tab,
limb_t  n 
)
+ Here is the caller graph for this function:

◆ bf_print_str()

void bf_print_str ( const char *  str,
const bf_t a 
)
+ Here is the caller graph for this function:

◆ bf_resize()

int bf_resize ( bf_t r,
limb_t  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_get_fft_size()

int bf_get_fft_size ( int *  pdpl,
int *  pnb_mods,
limb_t  len 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_normalize_and_round()

int bf_normalize_and_round ( bf_t r,
limb_t  prec1,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_can_round()

int bf_can_round ( const bf_t a,
slimb_t  prec,
bf_rnd_t  rnd_mode,
slimb_t  k 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_mul_log2_radix()

slimb_t bf_mul_log2_radix ( slimb_t  a1,
unsigned int  radix,
int  is_inv,
int  is_ceil1 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp_mul()

int mp_mul ( bf_context_t s,
limb_t result,
const limb_t op1,
limb_t  op1_size,
const limb_t op2,
limb_t  op2_size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp_add()

limb_t mp_add ( limb_t res,
const limb_t op1,
const limb_t op2,
limb_t  n,
limb_t  carry 
)
+ Here is the caller graph for this function:

◆ mp_add_ui()

limb_t mp_add_ui ( limb_t tab,
limb_t  b,
size_t  n 
)
+ Here is the caller graph for this function:

◆ mp_sqrtrem()

int mp_sqrtrem ( bf_context_t s,
limb_t tabs,
limb_t taba,
limb_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp_recip()

int mp_recip ( bf_context_t s,
limb_t tabr,
const limb_t taba,
limb_t  n 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_isqrt()

limb_t bf_isqrt ( limb_t  a)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_const_log2()

int bf_const_log2 ( bf_t T,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_const_pi()

int bf_const_pi ( bf_t T,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_exp()

int bf_exp ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_log()

int bf_log ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_pow()

int bf_pow ( bf_t r,
const bf_t x,
const bf_t y,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_cos()

int bf_cos ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_sin()

int bf_sin ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_tan()

int bf_tan ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_atan()

int bf_atan ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bf_atan2()

int bf_atan2 ( bf_t r,
const bf_t y,
const bf_t x,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_asin()

int bf_asin ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bf_acos()

int bf_acos ( bf_t r,
const bf_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bfdec_init()

static void bfdec_init ( bf_context_t s,
bfdec_t r 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_delete()

static void bfdec_delete ( bfdec_t r)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_neg()

static void bfdec_neg ( bfdec_t r)
static

◆ bfdec_is_finite()

static int bfdec_is_finite ( const bfdec_t a)
static

◆ bfdec_is_nan()

static int bfdec_is_nan ( const bfdec_t a)
static
+ Here is the caller graph for this function:

◆ bfdec_is_zero()

static int bfdec_is_zero ( const bfdec_t a)
static

◆ bfdec_memcpy()

static void bfdec_memcpy ( bfdec_t r,
const bfdec_t a 
)
static
+ Here is the call graph for this function:

◆ bfdec_set_ui()

int bfdec_set_ui ( bfdec_t r,
uint64_t  a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_set_si()

int bfdec_set_si ( bfdec_t r,
int64_t  a 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_set_nan()

static void bfdec_set_nan ( bfdec_t r)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_set_zero()

static void bfdec_set_zero ( bfdec_t r,
int  is_neg 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_set_inf()

static void bfdec_set_inf ( bfdec_t r,
int  is_neg 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_set()

static int bfdec_set ( bfdec_t r,
const bfdec_t a 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_move()

static void bfdec_move ( bfdec_t r,
bfdec_t a 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_cmpu()

static int bfdec_cmpu ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_cmp_full()

static int bfdec_cmp_full ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:

◆ bfdec_cmp()

static int bfdec_cmp ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_cmp_eq()

static int bfdec_cmp_eq ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_cmp_le()

static int bfdec_cmp_le ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:

◆ bfdec_cmp_lt()

static int bfdec_cmp_lt ( const bfdec_t a,
const bfdec_t b 
)
static
+ Here is the call graph for this function:

◆ bfdec_add()

int bfdec_add ( bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_sub()

int bfdec_sub ( bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_add_si()

int bfdec_add_si ( bfdec_t r,
const bfdec_t a,
int64_t  b1,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_mul()

int bfdec_mul ( bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_mul_si()

int bfdec_mul_si ( bfdec_t r,
const bfdec_t a,
int64_t  b1,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_div()

int bfdec_div ( bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_divrem()

int bfdec_divrem ( bfdec_t q,
bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags,
int  rnd_mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_rem()

int bfdec_rem ( bfdec_t r,
const bfdec_t a,
const bfdec_t b,
limb_t  prec,
bf_flags_t  flags,
int  rnd_mode 
)
+ Here is the call graph for this function:

◆ bfdec_rint()

int bfdec_rint ( bfdec_t r,
int  rnd_mode 
)
+ Here is the call graph for this function:

◆ bfdec_sqrt()

int bfdec_sqrt ( bfdec_t r,
const bfdec_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bfdec_round()

int bfdec_round ( bfdec_t r,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_get_int32()

int bfdec_get_int32 ( int *  pres,
const bfdec_t a 
)
+ Here is the call graph for this function:

◆ bfdec_pow_ui()

int bfdec_pow_ui ( bfdec_t r,
const bfdec_t a,
limb_t  b 
)
+ Here is the call graph for this function:

◆ bfdec_ftoa()

char* bfdec_ftoa ( size_t *  plen,
const bfdec_t a,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_atof()

int bfdec_atof ( bfdec_t r,
const char *  str,
const char **  pnext,
limb_t  prec,
bf_flags_t  flags 
)
+ Here is the call graph for this function:

◆ bfdec_print_str()

void bfdec_print_str ( const char *  str,
const bfdec_t a 
)

◆ bfdec_resize()

static int bfdec_resize ( bfdec_t r,
limb_t  len 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bfdec_normalize_and_round()

int bfdec_normalize_and_round ( bfdec_t r,
limb_t  prec1,
bf_flags_t  flags 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ mp_pow_dec

const limb_t mp_pow_dec[LIMB_DIGITS+1]
extern