Skip to content

Commit

Permalink
Fix exp range of dec32_fast
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Oct 4, 2024
1 parent b44ee5f commit 71ed999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/decimal/decimal32_fast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ constexpr decimal32_fast::decimal32_fast(T1 coeff, T2 exp, bool sign) noexcept
auto biased_exp {static_cast<std::uint_fast32_t>(exp + detail::bias)};

// Decimal32 exponent holds 8 bits
if (biased_exp > UINT32_C(0xFF))
if (biased_exp > detail::max_biased_exp_v<decimal32_fast>)
{
significand_ = detail::d32_fast_inf;
}
Expand Down

0 comments on commit 71ed999

Please sign in to comment.