diff --git a/include/boost/decimal/decimal128_t.hpp b/include/boost/decimal/decimal128_t.hpp index 22103ccf1..e3fc65f34 100644 --- a/include/boost/decimal/decimal128_t.hpp +++ b/include/boost/decimal/decimal128_t.hpp @@ -791,7 +791,7 @@ constexpr decimal128_t::decimal128_t(T1 coeff, T2 exp, bool is_negative) noexcep else if (coeff_digits + biased_exp <= detail::precision_v) { // Handle the case of sub-normals that don't need further rounding - bits_.high = sign ? detail::d128_sign_mask : UINT64_C(0); // Reset the sign bit + bits_.high = is_negative ? detail::d128_sign_mask : UINT64_C(0); // Reset the sign bit const auto zeros {detail::remove_trailing_zeros(reduced_coeff)}; biased_exp += static_cast(zeros.number_of_removed_zeros); reduced_coeff = zeros.trimmed_number; diff --git a/include/boost/decimal/decimal32_t.hpp b/include/boost/decimal/decimal32_t.hpp index e86a681c9..54771c6d2 100644 --- a/include/boost/decimal/decimal32_t.hpp +++ b/include/boost/decimal/decimal32_t.hpp @@ -713,7 +713,7 @@ constexpr decimal32_t::decimal32_t(T1 coeff, T2 exp, bool is_negative) noexcept else if (coeff_digits + biased_exp <= detail::precision) { // Handle the case of sub-normals that don't need further rounding - bits_ = sign ? detail::d32_sign_mask : UINT32_C(0); // Reset the sign bit + bits_ = is_negative ? detail::d32_sign_mask : UINT32_C(0); // Reset the sign bit const auto zeros {detail::remove_trailing_zeros(reduced_coeff)}; biased_exp += static_cast(zeros.number_of_removed_zeros); reduced_coeff = zeros.trimmed_number; diff --git a/include/boost/decimal/decimal64_t.hpp b/include/boost/decimal/decimal64_t.hpp index 35842e05e..4bd7f2e78 100644 --- a/include/boost/decimal/decimal64_t.hpp +++ b/include/boost/decimal/decimal64_t.hpp @@ -707,7 +707,7 @@ constexpr decimal64_t::decimal64_t(T1 coeff, T2 exp, bool is_negative) noexcept else if (coeff_digits + biased_exp <= detail::precision_v) { // Handle the case of sub-normals that don't need further rounding - bits_ = sign ? detail::d64_sign_mask : UINT64_C(0); // Reset the sign bit + bits_ = is_negative ? detail::d64_sign_mask : UINT64_C(0); // Reset the sign bit const auto zeros {detail::remove_trailing_zeros(reduced_coeff)}; biased_exp += static_cast(zeros.number_of_removed_zeros); reduced_coeff = zeros.trimmed_number;