NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
fast_float::detail Namespace Reference

Functions

constexpr fastfloat_really_inline int32_t power (int32_t q) noexcept
 
template<typename T >
from_chars_result parse_infnan (const char *first, const char *last, T &value) noexcept
 
void trim (decimal &h)
 
uint32_t number_of_digits_decimal_left_shift (const decimal &h, uint32_t shift)
 
uint64_t round (decimal &h)
 
void decimal_left_shift (decimal &h, uint32_t shift)
 
void decimal_right_shift (decimal &h, uint32_t shift)
 

Function Documentation

◆ decimal_left_shift()

void fast_float::detail::decimal_left_shift ( decimal &  h,
uint32_t  shift 
)
inline

Definition at line 153 of file simple_decimal_conversion.h.

References number_of_digits_decimal_left_shift(), and trim().

Referenced by fast_float::compute_float().

Here is the call graph for this function:

◆ decimal_right_shift()

void fast_float::detail::decimal_right_shift ( decimal &  h,
uint32_t  shift 
)
inline

Definition at line 195 of file simple_decimal_conversion.h.

References trim().

Referenced by fast_float::compute_float().

Here is the call graph for this function:

◆ number_of_digits_decimal_left_shift()

uint32_t fast_float::detail::number_of_digits_decimal_left_shift ( const decimal &  h,
uint32_t  shift 
)
inline

Definition at line 33 of file simple_decimal_conversion.h.

Referenced by decimal_left_shift().

◆ parse_infnan()

template<typename T >
from_chars_result fast_float::detail::parse_infnan ( const char *  first,
const char *  last,
T &  value 
)
noexcept

Special case +inf, -inf, nan, infinity, -infinity. The case comparisons could be made much faster given that we know that the strings a null-free and fixed.

Definition at line 23 of file parse_number.h.

References fast_float::from_chars_result::ec, fast_float::fastfloat_strncasecmp(), and fast_float::from_chars_result::ptr.

Referenced by fast_float::from_chars_advanced().

Here is the call graph for this function:

◆ power()

constexpr fastfloat_really_inline int32_t fast_float::detail::power ( int32_t  q)
constexprnoexcept

For q in (0,350), we have that f = (((152170 + 65536) * q ) >> 16); is equal to floor(p) + q where p = log(5**q)/log(2) = q * log(5)/log(2)

For negative values of q in (-400,0), we have that f = (((152170 + 65536) * q ) >> 16); is equal to -ceil(p) + q where p = log(5**-q)/log(2) = -q * log(5)/log(2)

Definition at line 58 of file decimal_to_binary.h.

Referenced by fast_float::add_native(), fast_float::compute_error_scaled(), fast_float::compute_float(), and fast_float::binary_format< T >::exact_power_of_ten().

◆ round()

uint64_t fast_float::detail::round ( decimal &  h)
inline

Definition at line 126 of file simple_decimal_conversion.h.

Referenced by fast_float::compute_float().

◆ trim()

void fast_float::detail::trim ( decimal &  h)
inline

Definition at line 25 of file simple_decimal_conversion.h.

Referenced by decimal_left_shift(), and decimal_right_shift().