FastLED 3.10.6
Loading...
Searching...
No Matches

◆ soft_float_bits_from_double_bits()

u32 fl::soft_float_bits_from_double_bits ( u64 bits)
inline

Definition at line 132 of file soft_float.h.

132 {
133 const u32 sign = (bits >> 63) ? 0x80000000u : 0u;
134 const u32 exp_bits = static_cast<u32>((bits >> 52) & 0x7FFu);
135 const u64 mantissa_bits = bits & 0x000FFFFFFFFFFFFFull;
136 if (exp_bits == 0x7FFu) {
137 return mantissa_bits == 0 ? sign | 0x7F800000u : sign | 0x7FC00000u;
138 }
139 if (exp_bits == 0) {
140 return detail::soft_float_bits_from_scaled_u64(sign, mantissa_bits, -1074);
141 }
143 sign, mantissa_bits | 0x0010000000000000ull,
144 static_cast<int>(exp_bits) - 1075);
145}
u32 soft_float_bits_from_scaled_u64(u32 sign, u64 magnitude, int binary_exp) FL_NO_EXCEPT
Definition soft_float.h:82
constexpr enable_if< is_fixed_point< T >::value, int >::type sign(T x) FL_NO_EXCEPT
fl::u64 u64
Definition stdint.h:220

References FL_NO_EXCEPT, sign(), and fl::detail::soft_float_bits_from_scaled_u64().

Referenced by fl::detail::json_ieee754_float_bits_from_double_bits(), and soft_double_to_float().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: