Skip to content

Commit d194c07

Browse files
committed
Use correct accessor functions
1 parent 8bf490c commit d194c07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/decimal/detail/div_impl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ BOOST_DECIMAL_FORCE_INLINE constexpr auto generic_div_impl(const T& lhs, const T
3232
constexpr auto precision_offset {std::numeric_limits<div_type>::digits10 - precision};
3333
constexpr auto ten_pow_offset {detail::pow10(static_cast<div_type>(precision_offset))};
3434

35-
const auto big_sig_lhs {lhs.sig * ten_pow_offset};
35+
const auto big_sig_lhs {lhs.full_significand() * ten_pow_offset};
3636

37-
const auto res_sig {big_sig_lhs / rhs.sig};
38-
const auto res_exp {(lhs.exp - precision_offset) - rhs.exp};
37+
const auto res_sig {big_sig_lhs / rhs.full_significand()};
38+
const auto res_exp {(lhs.biased_exponent() - precision_offset) - rhs.biased_exponent()};
3939

4040
// Normalizes sign handling
41-
bool sign {lhs.sign != rhs.sign};
41+
bool sign {lhs.isneg() != rhs.isneg()};
4242
if (BOOST_DECIMAL_UNLIKELY(res_sig == 0U))
4343
{
4444
sign = false;

0 commit comments

Comments
 (0)