header_utils
Loading...
Searching...
No Matches
detail Namespace Reference

The below code is based on Sun's libm library code, which is licensed under the following license: More...

Functions

constexpr auto nan_mix (auto x, auto y) noexcept
template<typename A, typename B>
constexpr void extract_words (A &high, B &low, double d) noexcept
template<typename A>
constexpr void get_high_word (A &high, double d) noexcept
template<typename A>
constexpr void get_low_word (A &low, double d) noexcept
template<typename A, typename B>
constexpr void insert_words (double &d, A high, B low) noexcept
template<typename A>
constexpr void set_high_word (double &d, A i) noexcept
template<typename A>
constexpr void set_low_word (double &d, A i) noexcept
constexpr double sqrt_impl (double x) noexcept
 0x3E54AE0B; 0xF85DDF44 =1/ln2 tail
constexpr double scalbn (double x, int n) noexcept
constexpr double pow_impl (double x, double y) noexcept

Variables

static constexpr double bp []
static constexpr double dp_h []
static constexpr double dp_l []
 0x3FE2B803; 0x40000000
static constexpr double zero
 0x3E4CFDEB; 0x43CFD006
static constexpr double half
static constexpr double qrtr
static constexpr double thrd
static constexpr double one
 0x3fd55555, 0x55555555
static constexpr double two
static constexpr double two53
static constexpr double huge
 0x43400000; 0x00000000
static constexpr double tiny
static constexpr double L1
static constexpr double L2
 0x3FE33333; 0x33333303
static constexpr double L3
 0x3FDB6DB6; 0xDB6FABFF
static constexpr double L4
 0x3FD55555; 0x518F264D
static constexpr double L5
 0x3FD17460; 0xA91D4101
static constexpr double L6
 0x3FCD864A; 0x93C9DB65
static constexpr double P1
 0x3FCA7E28; 0x4A454EEF
static constexpr double P2
 0x3FC55555; 0x5555553E
static constexpr double P3
 0xBF66C16C; 0x16BEBD93
static constexpr double P4
 0x3F11566A; 0xAF25DE2C
static constexpr double P5
 0xBEBBBD41; 0xC5D26BF1
static constexpr double lg2
 0x3E663769; 0x72BEA4D0
static constexpr double lg2_h
 0x3FE62E42; 0xFEFA39EF
static constexpr double lg2_l
 0x3FE62E43; 0x00000000
static constexpr double ovt
 0xBE205C61; 0x0CA86C39
static constexpr double cp
 -(1024-log2(ovfl+.5ulp))
static constexpr double cp_h
 0x3FEEC709; 0xDC3A03FD =2/(3ln2)
static constexpr double cp_l
 0x3FEEC709; 0xE0000000 =(float)cp
static constexpr double ivln2
 0xBE3E2FE0; 0x145B01F5 =tail of cp_h
static constexpr double ivln2_h
 0x3FF71547; 0x652B82FE =1/ln2
static constexpr double ivln2_l
 0x3FF71547; 0x60000000 =24b 1/ln2

Detailed Description

The below code is based on Sun's libm library code, which is licensed under the following license:

Function Documentation

◆ extract_words()

template<typename A, typename B>
void detail::extract_words ( A & high,
B & low,
double d )
constexprnoexcept

Definition at line 16 of file constexpr_math.inl.

◆ get_high_word()

template<typename A>
void detail::get_high_word ( A & high,
double d )
constexprnoexcept

Definition at line 23 of file constexpr_math.inl.

◆ get_low_word()

template<typename A>
void detail::get_low_word ( A & low,
double d )
constexprnoexcept

Definition at line 29 of file constexpr_math.inl.

◆ insert_words()

template<typename A, typename B>
void detail::insert_words ( double & d,
A high,
B low )
constexprnoexcept

Definition at line 35 of file constexpr_math.inl.

◆ nan_mix()

auto detail::nan_mix ( auto x,
auto y )
inlineconstexprnoexcept

Definition at line 13 of file constexpr_math.inl.

◆ pow_impl()

double detail::pow_impl ( double x,
double y )
constexprnoexcept

Definition at line 246 of file constexpr_math.inl.

◆ scalbn()

double detail::scalbn ( double x,
int n )
constexprnoexcept

Definition at line 212 of file constexpr_math.inl.

◆ set_high_word()

template<typename A>
void detail::set_high_word ( double & d,
A i )
constexprnoexcept

Definition at line 42 of file constexpr_math.inl.

◆ set_low_word()

template<typename A>
void detail::set_low_word ( double & d,
A i )
constexprnoexcept

Definition at line 50 of file constexpr_math.inl.

◆ sqrt_impl()

double detail::sqrt_impl ( double x)
constexprnoexcept

0x3E54AE0B; 0xF85DDF44 =1/ln2 tail

Definition at line 91 of file constexpr_math.inl.

Variable Documentation

◆ bp

double detail::bp[]
staticconstexpr

Definition at line 57 of file constexpr_math.inl.

◆ cp

double detail::cp
staticconstexpr

-(1024-log2(ovfl+.5ulp))

Definition at line 84 of file constexpr_math.inl.

◆ cp_h

double detail::cp_h
staticconstexpr

0x3FEEC709; 0xDC3A03FD =2/(3ln2)

Definition at line 85 of file constexpr_math.inl.

◆ cp_l

double detail::cp_l
staticconstexpr

0x3FEEC709; 0xE0000000 =(float)cp

Definition at line 86 of file constexpr_math.inl.

◆ dp_h

double detail::dp_h[]
staticconstexpr

Definition at line 58 of file constexpr_math.inl.

◆ dp_l

double detail::dp_l[]
staticconstexpr

0x3FE2B803; 0x40000000

Definition at line 59 of file constexpr_math.inl.

◆ half

double detail::half
staticconstexpr

Definition at line 61 of file constexpr_math.inl.

◆ huge

double detail::huge
staticconstexpr

0x43400000; 0x00000000

Definition at line 67 of file constexpr_math.inl.

◆ ivln2

double detail::ivln2
staticconstexpr

0xBE3E2FE0; 0x145B01F5 =tail of cp_h

Definition at line 87 of file constexpr_math.inl.

◆ ivln2_h

double detail::ivln2_h
staticconstexpr

0x3FF71547; 0x652B82FE =1/ln2

Definition at line 88 of file constexpr_math.inl.

◆ ivln2_l

double detail::ivln2_l
staticconstexpr

0x3FF71547; 0x60000000 =24b 1/ln2

Definition at line 89 of file constexpr_math.inl.

◆ L1

double detail::L1
staticconstexpr

Definition at line 69 of file constexpr_math.inl.

◆ L2

double detail::L2
staticconstexpr

0x3FE33333; 0x33333303

Definition at line 70 of file constexpr_math.inl.

◆ L3

double detail::L3
staticconstexpr

0x3FDB6DB6; 0xDB6FABFF

Definition at line 71 of file constexpr_math.inl.

◆ L4

double detail::L4
staticconstexpr

0x3FD55555; 0x518F264D

Definition at line 72 of file constexpr_math.inl.

◆ L5

double detail::L5
staticconstexpr

0x3FD17460; 0xA91D4101

Definition at line 73 of file constexpr_math.inl.

◆ L6

double detail::L6
staticconstexpr

0x3FCD864A; 0x93C9DB65

Definition at line 74 of file constexpr_math.inl.

◆ lg2

double detail::lg2
staticconstexpr

0x3E663769; 0x72BEA4D0

Definition at line 80 of file constexpr_math.inl.

◆ lg2_h

double detail::lg2_h
staticconstexpr

0x3FE62E42; 0xFEFA39EF

Definition at line 81 of file constexpr_math.inl.

◆ lg2_l

double detail::lg2_l
staticconstexpr

0x3FE62E43; 0x00000000

Definition at line 82 of file constexpr_math.inl.

◆ one

double detail::one
staticconstexpr

0x3fd55555, 0x55555555

Definition at line 64 of file constexpr_math.inl.

◆ ovt

double detail::ovt
staticconstexpr

0xBE205C61; 0x0CA86C39

Definition at line 83 of file constexpr_math.inl.

◆ P1

double detail::P1
staticconstexpr

0x3FCA7E28; 0x4A454EEF

Definition at line 75 of file constexpr_math.inl.

◆ P2

double detail::P2
staticconstexpr

0x3FC55555; 0x5555553E

Definition at line 76 of file constexpr_math.inl.

◆ P3

double detail::P3
staticconstexpr

0xBF66C16C; 0x16BEBD93

Definition at line 77 of file constexpr_math.inl.

◆ P4

double detail::P4
staticconstexpr

0x3F11566A; 0xAF25DE2C

Definition at line 78 of file constexpr_math.inl.

◆ P5

double detail::P5
staticconstexpr

0xBEBBBD41; 0xC5D26BF1

Definition at line 79 of file constexpr_math.inl.

◆ qrtr

double detail::qrtr
staticconstexpr

Definition at line 62 of file constexpr_math.inl.

◆ thrd

double detail::thrd
staticconstexpr

Definition at line 63 of file constexpr_math.inl.

◆ tiny

double detail::tiny
staticconstexpr

Definition at line 68 of file constexpr_math.inl.

◆ two

double detail::two
staticconstexpr

Definition at line 65 of file constexpr_math.inl.

◆ two53

double detail::two53
staticconstexpr

Definition at line 66 of file constexpr_math.inl.

◆ zero

double detail::zero
staticconstexpr

0x3E4CFDEB; 0x43CFD006

Definition at line 60 of file constexpr_math.inl.