Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::efloat_detail Namespace Reference

decimal formatting (binary -> decimal string at arbitrary precision) More...

Namespaces

namespace  fp
namespace  fixed_series

Classes

struct  pi_literal
struct  e_literal
struct  phi_literal
struct  two_over_sqrt_pi_constant
struct  half_log_2pi_constant
struct  ln2_constant
struct  ln10_constant
struct  atan_half_constant
struct  pi_constant

Typedefs

using limb_buffer = efloat_storage::scratch_limbs<512>

Enumerations

enum class  trig_function { sine , cosine , tangent }

Functions

void append_exponent (std::string &str, std::int64_t e)
void round_string (std::vector< char > &s, int precision, int *decimalPoint)
template<unsigned nlimbs>
void to_digits (const efloat< nlimbs > &value, std::vector< char > &s, std::int64_t &exponent, int precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > make_constant (std::string_view decimal)
template<unsigned nlimbs, typename Literal>
efloat< nlimbs > cached_literal ()
template<unsigned nlimbs, typename Literal>
constexpr efloat< nlimbs > literal_constant ()
template<unsigned nlimbs>
constexpr efloat< nlimbs > two_over_sqrt_pi (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exact_square (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > erf_series (const efloat< nlimbs > &x, const efloat< nlimbs > &x2, unsigned W)
constexpr bool erfc_asymptotic_reaches (double x2, unsigned W)
template<unsigned nlimbs>
constexpr efloat< nlimbs > erfc_asymptotic (const efloat< nlimbs > &x, const efloat< nlimbs > &x2, unsigned W)
template<unsigned nlimbs>
constexpr efloat< nlimbs > erf_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > erfc_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr bool erfc_negligible (const efloat< nlimbs > &x, unsigned precision)
constexpr double stirling_log2_term (unsigned k, double log2z)
constexpr unsigned stirling_terms (double log2z, unsigned W)
template<unsigned nlimbs>
constexpr std::vector< efloat< nlimbs > > stirling_compute (unsigned m, unsigned bits)
template<unsigned nlimbs>
const std::vector< efloat< nlimbs > > & stirling_coefficients (unsigned m, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > half_log_2pi (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > stirling_sum (const efloat< nlimbs > &z, double log2z, unsigned m, unsigned W)
template<unsigned nlimbs>
constexpr efloat< nlimbs > shift_product (const efloat< nlimbs > &x, int64_t N, unsigned W)
template<unsigned nlimbs>
constexpr efloat< nlimbs > lgamma_positive (const efloat< nlimbs > &x, unsigned W, int64_t &E)
template<unsigned nlimbs>
constexpr efloat< nlimbs > lgamma_abs (const efloat< nlimbs > &x, unsigned W, int64_t &E, bool &negative)
template<unsigned nlimbs>
constexpr int64_t lgamma_parts_scale (const efloat< nlimbs > &x, unsigned W)
template<unsigned nlimbs>
constexpr int64_t lgamma_scale_estimate (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr int64_t lgamma_precision (const efloat< nlimbs > &x, int64_t needed)
template<unsigned nlimbs>
constexpr int64_t tgamma_precision (const efloat< nlimbs > &x, int64_t needed)
template<unsigned nlimbs>
constexpr efloat< nlimbs > lgamma_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > tgamma_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr bool exact_factorial (int64_t n, unsigned limit, efloat< nlimbs > &result)
constexpr void raise_flags (uint32_t flags) noexcept
constexpr RoundingMode rounding_mode () noexcept
template<unsigned nlimbs>
constexpr unsigned result_precision (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr unsigned result_precision (const efloat< nlimbs > &x, const efloat< nlimbs > &y)
template<unsigned nlimbs>
constexpr void round_result (efloat< nlimbs > &result, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr bool can_round (const efloat< nlimbs > &y, unsigned precision, unsigned correct)
template<unsigned nlimbs, typename Evaluate>
constexpr efloat< nlimbs > round_ziv (Evaluate evaluate, unsigned precision, unsigned error_bits, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > round_near (efloat< nlimbs > value, int direction, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr unsigned significant_bits (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr bool is_integer (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr int64_t integer_value (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exact_power (const efloat< nlimbs > &x, uint64_t n)
template<unsigned nlimbs>
constexpr int64_t lowest_bit (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > widened (const efloat< nlimbs > &x, unsigned bits)
template<unsigned nlimbs>
constexpr std::size_t pack_significand (limb_kernels::limb_t *p, const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exact_product (const efloat< nlimbs > &x, const efloat< nlimbs > &y)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exact_sum (const efloat< nlimbs > &a, const efloat< nlimbs > &b, unsigned pad)
template<unsigned nlimbs>
constexpr bool exp_beyond_range (const efloat< nlimbs > &x, double log2_base)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exp_out_of_range (bool negative, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atanh_reciprocal (unsigned m, unsigned bits)
template<unsigned nlimbs, typename Compute, typename Cache>
constexpr efloat< nlimbs > constant_value (unsigned bits, Compute compute, Cache cache)
template<unsigned nlimbs, typename Compute>
efloat< nlimbs > cached_constant (unsigned bits, Compute compute)
template<unsigned nlimbs>
constexpr efloat< nlimbs > ln2 (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > ln10 (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exp_working (const efloat< nlimbs > &x, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exp_base_working (const efloat< nlimbs > &x, unsigned precision, bool ten)
template<unsigned nlimbs>
constexpr efloat< nlimbs > expm1_working (const efloat< nlimbs > &x, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > times_power_of_2 (efloat< nlimbs > x, int64_t k)
template<unsigned nlimbs>
constexpr efloat< nlimbs > integer_mod (const efloat< nlimbs > &a, const efloat< nlimbs > &m)
template<unsigned nlimbs>
constexpr efloat< nlimbs > power_of_2_mod (int64_t d, const efloat< nlimbs > &m)
template<unsigned nlimbs>
constexpr efloat< nlimbs > exact_mod (const efloat< nlimbs > &x, const efloat< nlimbs > &y)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sinh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > cosh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > tanh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > asinh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > acosh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atanh_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs, typename Evaluate>
constexpr efloat< nlimbs > round_hyperbolic (const efloat< nlimbs > &x, Evaluate evaluate)
template<unsigned nlimbs>
constexpr bool hyperbolic_tiny (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > hyperbolic_overflow (const efloat< nlimbs > &x, bool negative)
template<unsigned nlimbs>
constexpr void hypot_limbs (efloat< nlimbs > &result, const efloat< nlimbs > &x, const efloat< nlimbs > &y, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atanh_working_small (const efloat< nlimbs > &v, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_grid_point (unsigned j, unsigned bits)
template<unsigned nlimbs>
efloat< nlimbs > log_table_cached (unsigned j, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_table (unsigned j, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_table_series (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr int64_t log_magnitude (const efloat< nlimbs > &x)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_agm (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log_base_working (const efloat< nlimbs > &x, unsigned target, bool ten)
template<unsigned nlimbs>
constexpr efloat< nlimbs > log1p_working (const efloat< nlimbs > &x, unsigned target)
template<unsigned nlimbs>
constexpr bool is_power_of_ten (const efloat< nlimbs > &x, int64_t &j)
template<std::size_t M, unsigned nlimbs>
constexpr void top_aligned (limb_kernels::limb_t *a, const efloat< nlimbs > &x)
template<std::size_t M, unsigned nlimbs>
constexpr void fma_short (efloat< nlimbs > &result, const efloat< nlimbs > &x, const efloat< nlimbs > &y, const efloat< nlimbs > &z, unsigned precision_limbs, int64_t R, int64_t dz)
template<unsigned nlimbs>
constexpr void fma_limbs (efloat< nlimbs > &result, const efloat< nlimbs > &x, const efloat< nlimbs > &y, const efloat< nlimbs > &z, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > integer_power_working (const efloat< nlimbs > &x, uint64_t n, bool reciprocal, unsigned target)
constexpr unsigned pow_exact_bits (unsigned precision)
template<unsigned nlimbs>
constexpr bool power_in_range (const efloat< nlimbs > &x, uint64_t n)
template<unsigned nlimbs>
constexpr bool exact_pow (const efloat< nlimbs > &x, const efloat< nlimbs > &y, unsigned precision, efloat< nlimbs > &result)
constexpr bool keep_top (limb_kernels::limb_t *a, std::size_t &na, const limb_kernels::limb_t *p, std::size_t np, std::size_t w, int64_t &sh)
constexpr bool limbs_can_round (const limb_kernels::limb_t *a, std::size_t n, unsigned precision, unsigned correct)
template<unsigned nlimbs>
constexpr bool integer_power_limbs (efloat< nlimbs > &result, const efloat< nlimbs > &x, uint64_t n, bool reciprocal, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > pow_working (const efloat< nlimbs > &x, const efloat< nlimbs > &y, unsigned target, int &range)
template<unsigned nlimbs>
constexpr void load_shifted (limb_kernels::limb_t *r, std::size_t n, const efloat< nlimbs > &x, int64_t shift)
template<std::size_t M, unsigned nlimbs>
constexpr void sqrt_short (efloat< nlimbs > &result, const efloat< nlimbs > &a, unsigned plimbs)
template<unsigned nlimbs>
constexpr bool sqrt_is_short (const efloat< nlimbs > &a, unsigned plimbs)
template<unsigned nlimbs>
constexpr void sqrt_limbs (efloat< nlimbs > &result, const efloat< nlimbs > &a, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sqrt_to (const efloat< nlimbs > &a, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > cbrt_exact (const efloat< nlimbs > &m, unsigned precision)
template<unsigned nlimbs>
constexpr efloat< nlimbs > cbrt_to (const efloat< nlimbs > &a, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atan_reciprocal (unsigned m, unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atan_half (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > pi (unsigned bits)
template<unsigned nlimbs>
constexpr efloat< nlimbs > pi_scaled (unsigned bits, int e)
template<unsigned nlimbs>
constexpr efloat< nlimbs > reduce_half_pi (const efloat< nlimbs > &x, unsigned bits, unsigned &quadrant)
template<unsigned nlimbs>
constexpr efloat< nlimbs > versine_with (const efloat< nlimbs > &r, unsigned T)
constexpr unsigned versine_target (unsigned F) noexcept
constexpr unsigned arctangent_target (unsigned W) noexcept
constexpr unsigned arctangent_block_length (unsigned N) noexcept
template<unsigned nlimbs>
constexpr efloat< nlimbs > versine (const efloat< nlimbs > &r)
template<unsigned nlimbs>
constexpr efloat< nlimbs > sin_from_versine (const efloat< nlimbs > &v, const efloat< nlimbs > &r)
template<unsigned nlimbs>
constexpr efloat< nlimbs > cos_from_versine (const efloat< nlimbs > &v)
template<unsigned nlimbs>
constexpr efloat< nlimbs > trig_working (const efloat< nlimbs > &x, unsigned bits, trig_function f)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atan_working_with (const efloat< nlimbs > &x, unsigned working, unsigned T)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atan_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > asin_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > acos_working (const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs>
constexpr efloat< nlimbs > atan2_working (const efloat< nlimbs > &y, const efloat< nlimbs > &x, unsigned working)
template<unsigned nlimbs, typename Evaluate>
constexpr efloat< nlimbs > round_inverse_trig (Evaluate evaluate, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr efloat< nlimbs > round_pi (unsigned m, int e, bool negative, unsigned precision, bool carries)
template<unsigned nlimbs>
constexpr bool inverse_trig_tiny (const efloat< nlimbs > &x, unsigned precision)

Variables

constexpr unsigned constant_literal_bits = 3300u
constexpr unsigned constant_big_bits = 16384u
constexpr unsigned erf_guard_bits = 32u
constexpr unsigned erf_error_bits = 0u
constexpr double gamma_shift_per_bit = 0.15
constexpr unsigned gamma_error_bits = 22u
constexpr unsigned gamma_shift_group = 8u
constexpr unsigned exp_log_guard_bits = 64u
constexpr unsigned exp_error_bits = 16u
constexpr double exp_range_limit = 4611686018427387904.0
constexpr double log2_e = 1.4426950408889634
constexpr double log2_10 = 3.321928094887362
constexpr unsigned exp_derived_error_bits = exp_error_bits + 4u
constexpr unsigned hyperbolic_error_bits = 24u
constexpr unsigned log_table_shift = 9
constexpr unsigned log_table_first = 362
constexpr unsigned log_table_last = 724
constexpr unsigned log_agm_bits_per_series_bit = 4500
constexpr unsigned log_error_bits = 16
constexpr unsigned log_agm_guard_bits = 16
constexpr unsigned log_derived_error_bits = log_error_bits + 4u
constexpr unsigned pow_error_bits = exp_error_bits + 8u
constexpr unsigned integer_power_error_bits = 8u
constexpr unsigned trig_error_bits = 32u
constexpr unsigned inverse_trig_error_bits = 24u

Detailed Description

decimal formatting (binary -> decimal string at arbitrary precision)

Ported from ereal's to_string/to_digits: digits are extracted one at a time using efloat's OWN arithmetic (scale to [1,10) via *10 / /10, then repeatedly take floor and multiply by 10). Accuracy is limited by the operand's working precision. (issue #1150)

Typedef Documentation

◆ limb_buffer

Enumeration Type Documentation

◆ trig_function

Enumerator
sine 
cosine 
tangent 

Function Documentation

◆ acos_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::acos_working ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ acosh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::acosh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ append_exponent()

void sw::universal::efloat_detail::append_exponent ( std::string & str,
std::int64_t e )
inline

◆ arctangent_block_length()

unsigned sw::universal::efloat_detail::arctangent_block_length ( unsigned N)
inlineconstexprnoexcept

◆ arctangent_target()

unsigned sw::universal::efloat_detail::arctangent_target ( unsigned W)
inlineconstexprnoexcept

◆ asin_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::asin_working ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ asinh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::asinh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ atan2_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atan2_working ( const efloat< nlimbs > & y,
const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ atan_half()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atan_half ( unsigned bits)
inlineconstexpr

◆ atan_reciprocal()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atan_reciprocal ( unsigned m,
unsigned bits )
inlineconstexpr

◆ atan_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atan_working ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ atan_working_with()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atan_working_with ( const efloat< nlimbs > & x,
unsigned working,
unsigned T )
inlineconstexpr

◆ atanh_reciprocal()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atanh_reciprocal ( unsigned m,
unsigned bits )
inlineconstexpr

◆ atanh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atanh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ atanh_working_small()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::atanh_working_small ( const efloat< nlimbs > & v,
unsigned working )
inlineconstexpr

◆ cached_constant()

template<unsigned nlimbs, typename Compute>
efloat< nlimbs > sw::universal::efloat_detail::cached_constant ( unsigned bits,
Compute compute )
inline

◆ cached_literal()

template<unsigned nlimbs, typename Literal>
efloat< nlimbs > sw::universal::efloat_detail::cached_literal ( )
inline

◆ can_round()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::can_round ( const efloat< nlimbs > & y,
unsigned precision,
unsigned correct )
inlineconstexpr

◆ cbrt_exact()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::cbrt_exact ( const efloat< nlimbs > & m,
unsigned precision )
inlineconstexpr

◆ cbrt_to()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::cbrt_to ( const efloat< nlimbs > & a,
unsigned bits )
inlineconstexpr

◆ constant_value()

template<unsigned nlimbs, typename Compute, typename Cache>
efloat< nlimbs > sw::universal::efloat_detail::constant_value ( unsigned bits,
Compute compute,
Cache cache )
inlineconstexpr

◆ cos_from_versine()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::cos_from_versine ( const efloat< nlimbs > & v)
inlineconstexpr

◆ cosh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::cosh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ erf_series()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::erf_series ( const efloat< nlimbs > & x,
const efloat< nlimbs > & x2,
unsigned W )
inlineconstexpr

◆ erf_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::erf_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ erfc_asymptotic()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::erfc_asymptotic ( const efloat< nlimbs > & x,
const efloat< nlimbs > & x2,
unsigned W )
inlineconstexpr

◆ erfc_asymptotic_reaches()

bool sw::universal::efloat_detail::erfc_asymptotic_reaches ( double x2,
unsigned W )
inlineconstexpr

◆ erfc_negligible()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::erfc_negligible ( const efloat< nlimbs > & x,
unsigned precision )
inlineconstexpr

◆ erfc_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::erfc_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ exact_factorial()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::exact_factorial ( int64_t n,
unsigned limit,
efloat< nlimbs > & result )
inlineconstexpr

◆ exact_mod()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exact_mod ( const efloat< nlimbs > & x,
const efloat< nlimbs > & y )
inlineconstexpr

◆ exact_pow()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::exact_pow ( const efloat< nlimbs > & x,
const efloat< nlimbs > & y,
unsigned precision,
efloat< nlimbs > & result )
inlineconstexpr

◆ exact_power()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exact_power ( const efloat< nlimbs > & x,
uint64_t n )
inlineconstexpr

◆ exact_product()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exact_product ( const efloat< nlimbs > & x,
const efloat< nlimbs > & y )
inlineconstexpr

◆ exact_square()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exact_square ( const efloat< nlimbs > & x)
inlineconstexpr

◆ exact_sum()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exact_sum ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b,
unsigned pad )
inlineconstexpr

◆ exp_base_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exp_base_working ( const efloat< nlimbs > & x,
unsigned precision,
bool ten )
inlineconstexpr

◆ exp_beyond_range()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::exp_beyond_range ( const efloat< nlimbs > & x,
double log2_base )
inlineconstexpr

◆ exp_out_of_range()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exp_out_of_range ( bool negative,
unsigned precision,
bool carries )
inlineconstexpr

◆ exp_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::exp_working ( const efloat< nlimbs > & x,
unsigned precision )
inlineconstexpr

◆ expm1_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::expm1_working ( const efloat< nlimbs > & x,
unsigned precision )
inlineconstexpr

◆ fma_limbs()

template<unsigned nlimbs>
void sw::universal::efloat_detail::fma_limbs ( efloat< nlimbs > & result,
const efloat< nlimbs > & x,
const efloat< nlimbs > & y,
const efloat< nlimbs > & z,
unsigned precision )
inlineconstexpr

◆ fma_short()

template<std::size_t M, unsigned nlimbs>
void sw::universal::efloat_detail::fma_short ( efloat< nlimbs > & result,
const efloat< nlimbs > & x,
const efloat< nlimbs > & y,
const efloat< nlimbs > & z,
unsigned precision_limbs,
int64_t R,
int64_t dz )
inlineconstexpr

◆ half_log_2pi()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::half_log_2pi ( unsigned bits)
inlineconstexpr

◆ hyperbolic_overflow()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::hyperbolic_overflow ( const efloat< nlimbs > & x,
bool negative )
inlineconstexpr

◆ hyperbolic_tiny()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::hyperbolic_tiny ( const efloat< nlimbs > & x)
inlineconstexpr

◆ hypot_limbs()

template<unsigned nlimbs>
void sw::universal::efloat_detail::hypot_limbs ( efloat< nlimbs > & result,
const efloat< nlimbs > & x,
const efloat< nlimbs > & y,
unsigned precision )
inlineconstexpr

◆ integer_mod()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::integer_mod ( const efloat< nlimbs > & a,
const efloat< nlimbs > & m )
inlineconstexpr

◆ integer_power_limbs()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::integer_power_limbs ( efloat< nlimbs > & result,
const efloat< nlimbs > & x,
uint64_t n,
bool reciprocal,
unsigned precision,
bool carries )
inlineconstexpr

◆ integer_power_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::integer_power_working ( const efloat< nlimbs > & x,
uint64_t n,
bool reciprocal,
unsigned target )
inlineconstexpr

◆ integer_value()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::integer_value ( const efloat< nlimbs > & x)
inlineconstexpr

◆ inverse_trig_tiny()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::inverse_trig_tiny ( const efloat< nlimbs > & x,
unsigned precision )
inlineconstexpr

◆ is_integer()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::is_integer ( const efloat< nlimbs > & x)
inlineconstexpr

◆ is_power_of_ten()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::is_power_of_ten ( const efloat< nlimbs > & x,
int64_t & j )
inlineconstexpr

◆ keep_top()

bool sw::universal::efloat_detail::keep_top ( limb_kernels::limb_t * a,
std::size_t & na,
const limb_kernels::limb_t * p,
std::size_t np,
std::size_t w,
int64_t & sh )
inlineconstexpr

◆ lgamma_abs()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::lgamma_abs ( const efloat< nlimbs > & x,
unsigned W,
int64_t & E,
bool & negative )
inlineconstexpr

◆ lgamma_parts_scale()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::lgamma_parts_scale ( const efloat< nlimbs > & x,
unsigned W )
inlineconstexpr

◆ lgamma_positive()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::lgamma_positive ( const efloat< nlimbs > & x,
unsigned W,
int64_t & E )
inlineconstexpr

◆ lgamma_precision()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::lgamma_precision ( const efloat< nlimbs > & x,
int64_t needed )
inlineconstexpr

◆ lgamma_scale_estimate()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::lgamma_scale_estimate ( const efloat< nlimbs > & x)
inlineconstexpr

◆ lgamma_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::lgamma_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ limbs_can_round()

bool sw::universal::efloat_detail::limbs_can_round ( const limb_kernels::limb_t * a,
std::size_t n,
unsigned precision,
unsigned correct )
inlineconstexpr

◆ literal_constant()

template<unsigned nlimbs, typename Literal>
efloat< nlimbs > sw::universal::efloat_detail::literal_constant ( )
inlineconstexpr

◆ ln10()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::ln10 ( unsigned bits)
inlineconstexpr

◆ ln2()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::ln2 ( unsigned bits)
inlineconstexpr

◆ load_shifted()

template<unsigned nlimbs>
void sw::universal::efloat_detail::load_shifted ( limb_kernels::limb_t * r,
std::size_t n,
const efloat< nlimbs > & x,
int64_t shift )
inlineconstexpr

◆ log1p_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log1p_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ log_agm()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_agm ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ log_base_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_base_working ( const efloat< nlimbs > & x,
unsigned target,
bool ten )
inlineconstexpr

◆ log_grid_point()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_grid_point ( unsigned j,
unsigned bits )
inlineconstexpr

◆ log_magnitude()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::log_magnitude ( const efloat< nlimbs > & x)
inlineconstexpr

◆ log_table()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_table ( unsigned j,
unsigned bits )
inlineconstexpr

◆ log_table_cached()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_table_cached ( unsigned j,
unsigned bits )
inline

◆ log_table_series()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_table_series ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ log_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::log_working ( const efloat< nlimbs > & x,
unsigned working )
inlineconstexpr

◆ lowest_bit()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::lowest_bit ( const efloat< nlimbs > & x)
inlineconstexpr

◆ make_constant()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::make_constant ( std::string_view decimal)
inlineconstexpr

◆ pack_significand()

template<unsigned nlimbs>
std::size_t sw::universal::efloat_detail::pack_significand ( limb_kernels::limb_t * p,
const efloat< nlimbs > & x )
inlineconstexpr

◆ pi()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::pi ( unsigned bits)
inlineconstexpr

◆ pi_scaled()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::pi_scaled ( unsigned bits,
int e )
inlineconstexpr

◆ pow_exact_bits()

unsigned sw::universal::efloat_detail::pow_exact_bits ( unsigned precision)
inlineconstexpr

◆ pow_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::pow_working ( const efloat< nlimbs > & x,
const efloat< nlimbs > & y,
unsigned target,
int & range )
inlineconstexpr

◆ power_in_range()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::power_in_range ( const efloat< nlimbs > & x,
uint64_t n )
inlineconstexpr

◆ power_of_2_mod()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::power_of_2_mod ( int64_t d,
const efloat< nlimbs > & m )
inlineconstexpr

◆ raise_flags()

void sw::universal::efloat_detail::raise_flags ( uint32_t flags)
inlineconstexprnoexcept

◆ reduce_half_pi()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::reduce_half_pi ( const efloat< nlimbs > & x,
unsigned bits,
unsigned & quadrant )
inlineconstexpr

◆ result_precision() [1/2]

template<unsigned nlimbs>
unsigned sw::universal::efloat_detail::result_precision ( const efloat< nlimbs > & x)
inlineconstexpr

◆ result_precision() [2/2]

template<unsigned nlimbs>
unsigned sw::universal::efloat_detail::result_precision ( const efloat< nlimbs > & x,
const efloat< nlimbs > & y )
inlineconstexpr

◆ round_hyperbolic()

template<unsigned nlimbs, typename Evaluate>
efloat< nlimbs > sw::universal::efloat_detail::round_hyperbolic ( const efloat< nlimbs > & x,
Evaluate evaluate )
inlineconstexpr

◆ round_inverse_trig()

template<unsigned nlimbs, typename Evaluate>
efloat< nlimbs > sw::universal::efloat_detail::round_inverse_trig ( Evaluate evaluate,
unsigned precision,
bool carries )
inlineconstexpr

◆ round_near()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::round_near ( efloat< nlimbs > value,
int direction,
unsigned precision,
bool carries )
inlineconstexpr

◆ round_pi()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::round_pi ( unsigned m,
int e,
bool negative,
unsigned precision,
bool carries )
inlineconstexpr

◆ round_result()

template<unsigned nlimbs>
void sw::universal::efloat_detail::round_result ( efloat< nlimbs > & result,
unsigned precision,
bool carries )
inlineconstexpr

◆ round_string()

void sw::universal::efloat_detail::round_string ( std::vector< char > & s,
int precision,
int * decimalPoint )
inline

◆ round_ziv()

template<unsigned nlimbs, typename Evaluate>
efloat< nlimbs > sw::universal::efloat_detail::round_ziv ( Evaluate evaluate,
unsigned precision,
unsigned error_bits,
bool carries )
inlineconstexpr

◆ rounding_mode()

RoundingMode sw::universal::efloat_detail::rounding_mode ( )
inlineconstexprnoexcept

◆ shift_product()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::shift_product ( const efloat< nlimbs > & x,
int64_t N,
unsigned W )
inlineconstexpr

◆ significant_bits()

template<unsigned nlimbs>
unsigned sw::universal::efloat_detail::significant_bits ( const efloat< nlimbs > & x)
inlineconstexpr

◆ sin_from_versine()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::sin_from_versine ( const efloat< nlimbs > & v,
const efloat< nlimbs > & r )
inlineconstexpr

◆ sinh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::sinh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ sqrt_is_short()

template<unsigned nlimbs>
bool sw::universal::efloat_detail::sqrt_is_short ( const efloat< nlimbs > & a,
unsigned plimbs )
inlineconstexpr

◆ sqrt_limbs()

template<unsigned nlimbs>
void sw::universal::efloat_detail::sqrt_limbs ( efloat< nlimbs > & result,
const efloat< nlimbs > & a,
unsigned precision )
inlineconstexpr

◆ sqrt_short()

template<std::size_t M, unsigned nlimbs>
void sw::universal::efloat_detail::sqrt_short ( efloat< nlimbs > & result,
const efloat< nlimbs > & a,
unsigned plimbs )
inlineconstexpr

◆ sqrt_to()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::sqrt_to ( const efloat< nlimbs > & a,
unsigned bits )
inlineconstexpr

◆ stirling_coefficients()

template<unsigned nlimbs>
const std::vector< efloat< nlimbs > > & sw::universal::efloat_detail::stirling_coefficients ( unsigned m,
unsigned bits )
inline

◆ stirling_compute()

template<unsigned nlimbs>
std::vector< efloat< nlimbs > > sw::universal::efloat_detail::stirling_compute ( unsigned m,
unsigned bits )
inlineconstexpr

◆ stirling_log2_term()

double sw::universal::efloat_detail::stirling_log2_term ( unsigned k,
double log2z )
inlineconstexpr

◆ stirling_sum()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::stirling_sum ( const efloat< nlimbs > & z,
double log2z,
unsigned m,
unsigned W )
inlineconstexpr

◆ stirling_terms()

unsigned sw::universal::efloat_detail::stirling_terms ( double log2z,
unsigned W )
inlineconstexpr

◆ tanh_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::tanh_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ tgamma_precision()

template<unsigned nlimbs>
int64_t sw::universal::efloat_detail::tgamma_precision ( const efloat< nlimbs > & x,
int64_t needed )
inlineconstexpr

◆ tgamma_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::tgamma_working ( const efloat< nlimbs > & x,
unsigned target )
inlineconstexpr

◆ times_power_of_2()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::times_power_of_2 ( efloat< nlimbs > x,
int64_t k )
inlineconstexpr

◆ to_digits()

template<unsigned nlimbs>
void sw::universal::efloat_detail::to_digits ( const efloat< nlimbs > & value,
std::vector< char > & s,
std::int64_t & exponent,
int precision )

◆ top_aligned()

template<std::size_t M, unsigned nlimbs>
void sw::universal::efloat_detail::top_aligned ( limb_kernels::limb_t * a,
const efloat< nlimbs > & x )
inlineconstexpr

◆ trig_working()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::trig_working ( const efloat< nlimbs > & x,
unsigned bits,
trig_function f )
inlineconstexpr

◆ two_over_sqrt_pi()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::two_over_sqrt_pi ( unsigned bits)
inlineconstexpr

◆ versine()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::versine ( const efloat< nlimbs > & r)
inlineconstexpr

◆ versine_target()

unsigned sw::universal::efloat_detail::versine_target ( unsigned F)
inlineconstexprnoexcept

◆ versine_with()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::versine_with ( const efloat< nlimbs > & r,
unsigned T )
inlineconstexpr

◆ widened()

template<unsigned nlimbs>
efloat< nlimbs > sw::universal::efloat_detail::widened ( const efloat< nlimbs > & x,
unsigned bits )
inlineconstexpr

Variable Documentation

◆ constant_big_bits

unsigned sw::universal::efloat_detail::constant_big_bits = 16384u
inlineconstexpr

◆ constant_literal_bits

unsigned sw::universal::efloat_detail::constant_literal_bits = 3300u
inlineconstexpr

◆ erf_error_bits

unsigned sw::universal::efloat_detail::erf_error_bits = 0u
inlineconstexpr

◆ erf_guard_bits

unsigned sw::universal::efloat_detail::erf_guard_bits = 32u
inlineconstexpr

◆ exp_derived_error_bits

unsigned sw::universal::efloat_detail::exp_derived_error_bits = exp_error_bits + 4u
inlineconstexpr

◆ exp_error_bits

unsigned sw::universal::efloat_detail::exp_error_bits = 16u
inlineconstexpr

◆ exp_log_guard_bits

unsigned sw::universal::efloat_detail::exp_log_guard_bits = 64u
inlineconstexpr

◆ exp_range_limit

double sw::universal::efloat_detail::exp_range_limit = 4611686018427387904.0
inlineconstexpr

◆ gamma_error_bits

unsigned sw::universal::efloat_detail::gamma_error_bits = 22u
inlineconstexpr

◆ gamma_shift_group

unsigned sw::universal::efloat_detail::gamma_shift_group = 8u
inlineconstexpr

◆ gamma_shift_per_bit

double sw::universal::efloat_detail::gamma_shift_per_bit = 0.15
inlineconstexpr

◆ hyperbolic_error_bits

unsigned sw::universal::efloat_detail::hyperbolic_error_bits = 24u
inlineconstexpr

◆ integer_power_error_bits

unsigned sw::universal::efloat_detail::integer_power_error_bits = 8u
inlineconstexpr

◆ inverse_trig_error_bits

unsigned sw::universal::efloat_detail::inverse_trig_error_bits = 24u
inlineconstexpr

◆ log2_10

double sw::universal::efloat_detail::log2_10 = 3.321928094887362
inlineconstexpr

◆ log2_e

double sw::universal::efloat_detail::log2_e = 1.4426950408889634
inlineconstexpr

◆ log_agm_bits_per_series_bit

unsigned sw::universal::efloat_detail::log_agm_bits_per_series_bit = 4500
inlineconstexpr

◆ log_agm_guard_bits

unsigned sw::universal::efloat_detail::log_agm_guard_bits = 16
inlineconstexpr

◆ log_derived_error_bits

unsigned sw::universal::efloat_detail::log_derived_error_bits = log_error_bits + 4u
inlineconstexpr

◆ log_error_bits

unsigned sw::universal::efloat_detail::log_error_bits = 16
inlineconstexpr

◆ log_table_first

unsigned sw::universal::efloat_detail::log_table_first = 362
inlineconstexpr

◆ log_table_last

unsigned sw::universal::efloat_detail::log_table_last = 724
inlineconstexpr

◆ log_table_shift

unsigned sw::universal::efloat_detail::log_table_shift = 9
inlineconstexpr

◆ pow_error_bits

unsigned sw::universal::efloat_detail::pow_error_bits = exp_error_bits + 8u
inlineconstexpr

◆ trig_error_bits

unsigned sw::universal::efloat_detail::trig_error_bits = 32u
inlineconstexpr