mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
tweak
This commit is contained in:
parent
ba328bbf7d
commit
eea6fef9a1
@ -573,9 +573,9 @@ template<typename T>
|
|||||||
fastfloat_really_inline FASTFLOAT_CONSTEXPR20
|
fastfloat_really_inline FASTFLOAT_CONSTEXPR20
|
||||||
void to_float(bool negative, adjusted_mantissa am, T &value) {
|
void to_float(bool negative, adjusted_mantissa am, T &value) {
|
||||||
using fastfloat_uint = typename binary_format<T>::equiv_uint;
|
using fastfloat_uint = typename binary_format<T>::equiv_uint;
|
||||||
uint word = (uint)am.mantissa;
|
fastfloat_uint word = (uint)am.mantissa;
|
||||||
word |= uint(am.power2) << binary_format<T>::mantissa_explicit_bits();
|
word |= fastfloat_uint(am.power2) << binary_format<T>::mantissa_explicit_bits();
|
||||||
word |= uint(negative) << binary_format<T>::sign_index();
|
word |= fastfloat_uint(negative) << binary_format<T>::sign_index();
|
||||||
#if FASTFLOAT_HAS_BIT_CAST
|
#if FASTFLOAT_HAS_BIT_CAST
|
||||||
value = std::bit_cast<T>(word);
|
value = std::bit_cast<T>(word);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user