ieee754.h
¶
Functions
-
static constexpr bool target_is_little_endian()¶
Test target machine native little-endianness.
-
static inline uint64_t type_pun_double_to_uint64_t(double d)¶
-
static inline double type_pun_uint64_t_to_double(uint64_t num)¶
-
static inline bool sign_of_double(double d)¶
-
static inline int exp_of_double(double d)¶
Return the biased exponent of a
double
in aint64_t
. Return value range: [0, 2048)
-
static inline uint64_t man_of_double(double d)¶
Return significand/mantissa of a
double
(without the hidden one) in auint64_t
. Range of returned value: [0, 4503599627370496)
-
static inline void set_sign_of_double(double &d, bool sign)¶
[Un]set the sign of a
double
type from abool
-
static inline void set_exp_of_double(double &d, int exp)¶
Set the exponent part of a
double
fromint
. Domain of argumentexp
: [0, 2048)
-
static inline void set_man_of_double(double &d, uint64_t man)¶
Set the mantissa part of a
double
fromuint64_t
. Domain of argumentuint64_t
: [0, 4503599627370496)