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 >
constexpr 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 >
constexpr 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 >
constexpr 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 >
constexpr void detail::insert_words ( double &  d,
high,
low 
)
constexprnoexcept

Definition at line 35 of file constexpr_math.inl.

◆ nan_mix()

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

Definition at line 13 of file constexpr_math.inl.

◆ pow_impl()

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

Definition at line 245 of file constexpr_math.inl.

◆ scalbn()

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

Definition at line 211 of file constexpr_math.inl.

◆ set_high_word()

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

Definition at line 42 of file constexpr_math.inl.

◆ set_low_word()

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

Definition at line 50 of file constexpr_math.inl.

◆ sqrt_impl()

constexpr double detail::sqrt_impl ( double  x)
constexprnoexcept

0x3E54AE0B; 0xF85DDF44 =1/ln2 tail

Definition at line 91 of file constexpr_math.inl.

Variable Documentation

◆ bp

constexpr double detail::bp[]
staticconstexpr

Definition at line 57 of file constexpr_math.inl.

◆ cp

constexpr double detail::cp
staticconstexpr

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

Definition at line 84 of file constexpr_math.inl.

◆ cp_h

constexpr double detail::cp_h
staticconstexpr

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

Definition at line 85 of file constexpr_math.inl.

◆ cp_l

constexpr double detail::cp_l
staticconstexpr

0x3FEEC709; 0xE0000000 =(float)cp

Definition at line 86 of file constexpr_math.inl.

◆ dp_h

constexpr double detail::dp_h[]
staticconstexpr

Definition at line 58 of file constexpr_math.inl.

◆ dp_l

constexpr double detail::dp_l[]
staticconstexpr

0x3FE2B803; 0x40000000

Definition at line 59 of file constexpr_math.inl.

◆ half

constexpr double detail::half
staticconstexpr

Definition at line 61 of file constexpr_math.inl.

◆ huge

constexpr double detail::huge
staticconstexpr

0x43400000; 0x00000000

Definition at line 67 of file constexpr_math.inl.

◆ ivln2

constexpr double detail::ivln2
staticconstexpr

0xBE3E2FE0; 0x145B01F5 =tail of cp_h

Definition at line 87 of file constexpr_math.inl.

◆ ivln2_h

constexpr double detail::ivln2_h
staticconstexpr

0x3FF71547; 0x652B82FE =1/ln2

Definition at line 88 of file constexpr_math.inl.

◆ ivln2_l

constexpr double detail::ivln2_l
staticconstexpr

0x3FF71547; 0x60000000 =24b 1/ln2

Definition at line 89 of file constexpr_math.inl.

◆ L1

constexpr double detail::L1
staticconstexpr

Definition at line 69 of file constexpr_math.inl.

◆ L2

constexpr double detail::L2
staticconstexpr

0x3FE33333; 0x33333303

Definition at line 70 of file constexpr_math.inl.

◆ L3

constexpr double detail::L3
staticconstexpr

0x3FDB6DB6; 0xDB6FABFF

Definition at line 71 of file constexpr_math.inl.

◆ L4

constexpr double detail::L4
staticconstexpr

0x3FD55555; 0x518F264D

Definition at line 72 of file constexpr_math.inl.

◆ L5

constexpr double detail::L5
staticconstexpr

0x3FD17460; 0xA91D4101

Definition at line 73 of file constexpr_math.inl.

◆ L6

constexpr double detail::L6
staticconstexpr

0x3FCD864A; 0x93C9DB65

Definition at line 74 of file constexpr_math.inl.

◆ lg2

constexpr double detail::lg2
staticconstexpr

0x3E663769; 0x72BEA4D0

Definition at line 80 of file constexpr_math.inl.

◆ lg2_h

constexpr double detail::lg2_h
staticconstexpr

0x3FE62E42; 0xFEFA39EF

Definition at line 81 of file constexpr_math.inl.

◆ lg2_l

constexpr double detail::lg2_l
staticconstexpr

0x3FE62E43; 0x00000000

Definition at line 82 of file constexpr_math.inl.

◆ one

constexpr double detail::one
staticconstexpr

0x3fd55555, 0x55555555

Definition at line 64 of file constexpr_math.inl.

◆ ovt

constexpr double detail::ovt
staticconstexpr

0xBE205C61; 0x0CA86C39

Definition at line 83 of file constexpr_math.inl.

◆ P1

constexpr double detail::P1
staticconstexpr

0x3FCA7E28; 0x4A454EEF

Definition at line 75 of file constexpr_math.inl.

◆ P2

constexpr double detail::P2
staticconstexpr

0x3FC55555; 0x5555553E

Definition at line 76 of file constexpr_math.inl.

◆ P3

constexpr double detail::P3
staticconstexpr

0xBF66C16C; 0x16BEBD93

Definition at line 77 of file constexpr_math.inl.

◆ P4

constexpr double detail::P4
staticconstexpr

0x3F11566A; 0xAF25DE2C

Definition at line 78 of file constexpr_math.inl.

◆ P5

constexpr double detail::P5
staticconstexpr

0xBEBBBD41; 0xC5D26BF1

Definition at line 79 of file constexpr_math.inl.

◆ qrtr

constexpr double detail::qrtr
staticconstexpr

Definition at line 62 of file constexpr_math.inl.

◆ thrd

constexpr double detail::thrd
staticconstexpr

Definition at line 63 of file constexpr_math.inl.

◆ tiny

constexpr double detail::tiny
staticconstexpr

Definition at line 68 of file constexpr_math.inl.

◆ two

constexpr double detail::two
staticconstexpr

Definition at line 65 of file constexpr_math.inl.

◆ two53

constexpr double detail::two53
staticconstexpr

Definition at line 66 of file constexpr_math.inl.

◆ zero

constexpr double detail::zero
staticconstexpr

0x3E4CFDEB; 0x43CFD006

Definition at line 60 of file constexpr_math.inl.