@@ -74,27 +74,27 @@ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_snan_mask {UINT64
7474// s eeeeeeeeeeeeee (0TTT) 110-bits
7575// s 11 eeeeeeeeeeeeee (100T) 110-bits
7676
77- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_sign_mask {UINT64_C (0b1'00000'00000000'0000000000'0000000000'0000000000'0000000000'0000000000 )};
78- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_combination_field_mask = UINT64_C(0b0'11'00000000'000'0000000000'0000000000'0000000000'0000000000'0000000000 );
77+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_sign_mask {UINT64_C (0x8000000000000000 )};
78+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_combination_field_mask = UINT64_C(0x6000000000000000 );
7979
80- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_not_11_exp_mask = UINT64_C(0b0'11111111111111'000000000'0000000000'0000000000'0000000000'0000000000 );
80+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_not_11_exp_mask = UINT64_C(0x7FFE000000000000 );
8181BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_not_11_exp_high_word_shift {49U };
82- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_11_exp_mask {UINT64_C (0b0'00'11111111111111'0000000'0000000000'0000000000'0000000000'0000000000 )};
82+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_11_exp_mask {UINT64_C (0x1FFF800000000000 )};
8383BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_11_exp_high_word_shift {47U };
8484
85- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_not_11_significand_mask {UINT64_C (0b0'00000000000000'111111111'1111111111'1111111111'1111111111'1111111111 ), UINT64_MAX};
86- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_11_significand_mask {UINT64_C (0b0'00'00000000000000'1111111'1111111111'1111111111'1111111111'1111111111 ), UINT64_MAX};
85+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_not_11_significand_mask {UINT64_C (0x1FFFFFFFFFFFF ), UINT64_MAX};
86+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_11_significand_mask {UINT64_C (0x7FFFFFFFFFFF ), UINT64_MAX};
8787
8888BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_biggest_no_combination_significand {d128_not_11_significand_mask};
8989
9090BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE std::uint64_t d128_max_biased_exponent {UINT64_C (12287 )};
91- BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_max_significand_value {UINT64_C (0b1111011010000100110111110101011011000011111000000 ), UINT64_C (0b0011011110001101100011100110001111111111111111111111111111111111 )};
91+ BOOST_DECIMAL_INLINE_CONSTEXPR_VARIABLE int128::uint128_t d128_max_significand_value {UINT64_C (0x1ED09BEAD87C0 ), UINT64_C (0x378D8E63FFFFFFFF )};
9292
9393template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
9494constexpr auto to_chars_scientific_impl (char * first, char * last, const TargetDecimalType& value, chars_format fmt) noexcept -> to_chars_result;
9595
9696template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
97- constexpr auto to_chars_fixed_impl (char * first, char * last, const TargetDecimalType& value, const chars_format fmt) noexcept -> to_chars_result;
97+ constexpr auto to_chars_fixed_impl (char * first, char * last, const TargetDecimalType& value, chars_format fmt) noexcept -> to_chars_result;
9898
9999template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
100100constexpr auto to_chars_hex_impl (char * first, char * last, const TargetDecimalType& value) noexcept -> to_chars_result;
@@ -621,7 +621,7 @@ constexpr auto decimal128_t::full_significand() const noexcept -> significand_ty
621621
622622 if ((bits_.high & detail::d128_combination_field_mask) == detail::d128_combination_field_mask)
623623 {
624- constexpr int128::uint128_t implied_bit {UINT64_C (0b10000000000000000000000000000000000000000000000000 ),0 };
624+ constexpr int128::uint128_t implied_bit {UINT64_C (0x2000000000000 ),0 };
625625 significand = implied_bit | (bits_ & detail::d128_11_significand_mask);
626626 }
627627 else
@@ -644,7 +644,7 @@ constexpr auto decimal128_t::to_components() const noexcept -> detail::decimal12
644644
645645 if ((bits_.high & detail::d128_combination_field_mask) == detail::d128_combination_field_mask)
646646 {
647- constexpr int128::uint128_t implied_bit {UINT64_C (0b10000000000000000000000000000000000000000000000000 ),0 };
647+ constexpr int128::uint128_t implied_bit {UINT64_C (0x2000000000000 ),0 };
648648 significand = implied_bit | (bits_ & detail::d128_11_significand_mask);
649649 expval = (bits_.high & detail::d128_11_exp_mask) >> detail::d128_11_exp_high_word_shift;
650650 }
@@ -889,8 +889,8 @@ class numeric_limits_impl128
889889
890890 // Member functions
891891 static constexpr auto (min) () -> boost::decimal::decimal128_t { return {UINT32_C (1 ), min_exponent}; }
892- static constexpr auto (max) () -> boost::decimal::decimal128_t { return {boost::int128:: uint128_t { UINT64_C ( 0b1111011010000100110111110101011011000011111000000 ), UINT64_C ( 0b0011011110001101100011100110001111111111111111111111111111111111 )} , max_exponent - digits + 1 }; }
893- static constexpr auto lowest () -> boost::decimal::decimal128_t { return {boost::int128:: uint128_t { UINT64_C ( 0b1111011010000100110111110101011011000011111000000 ), UINT64_C ( 0b0011011110001101100011100110001111111111111111111111111111111111 )} , max_exponent - digits + 1 , construction_sign::negative}; }
892+ static constexpr auto (max) () -> boost::decimal::decimal128_t { return {d128_max_significand_value , max_exponent - digits + 1 }; }
893+ static constexpr auto lowest () -> boost::decimal::decimal128_t { return {d128_max_significand_value , max_exponent - digits + 1 , construction_sign::negative}; }
894894 static constexpr auto epsilon () -> boost::decimal::decimal128_t { return {UINT32_C (1 ), -digits + 1 }; }
895895 static constexpr auto round_error () -> boost::decimal::decimal128_t { return epsilon (); }
896896 static constexpr auto infinity () -> boost::decimal::decimal128_t { return boost::decimal::from_bits (boost::decimal::detail::d128_inf_mask); }
0 commit comments