TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::detail Namespace Reference

Functions

std::optional< double > parse_double_strtod (std::string_view s)
 strtod_l with the "C" locale, restricted to the grammar of std::from_chars(chars_format::general): strtod also takes leading whitespace, '+' and hex, which from_chars does not.
std::optional< double > parse_double_from_chars (std::string_view s)
TM_HD_INLINE constexpr void mul_hi_lo (std::uint32_t a, std::uint32_t b, std::uint32_t &hi, std::uint32_t &lo)

Function Documentation

◆ mul_hi_lo()

TM_HD_INLINE constexpr void tmk::detail::mul_hi_lo ( std::uint32_t a,
std::uint32_t b,
std::uint32_t & hi,
std::uint32_t & lo )
constexpr

Definition at line 28 of file rng.hpp.

◆ parse_double_from_chars()

std::optional< double > tmk::detail::parse_double_from_chars ( std::string_view s)
inline

Definition at line 44 of file parse_double.hpp.

◆ parse_double_strtod()

std::optional< double > tmk::detail::parse_double_strtod ( std::string_view s)
inline

strtod_l with the "C" locale, restricted to the grammar of std::from_chars(chars_format::general): strtod also takes leading whitespace, '+' and hex, which from_chars does not.

Correctly rounded on glibc and Apple's libc, so it gives the same double as from_chars; tests/test_units.cpp checks that wherever from_chars exists.

< strtod needs a terminated string

strtod also sets ERANGE for a subnormal result, which from_chars returns; only overflow and underflow to zero are result_out_of_range there.

Definition at line 24 of file parse_double.hpp.