Skip to content

Commit 4856707

Browse files
committed
Simplify operator/
1 parent 51d4bad commit 4856707

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

include/boost/decimal/decimal128_fast.hpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,24 +1072,16 @@ constexpr auto d128f_div_impl(decimal128_fast lhs, decimal128_fast rhs, decimal1
10721072
#else
10731073
static_cast<void>(r);
10741074
#endif
1075-
1076-
auto sig_lhs {lhs.full_significand()};
1077-
auto exp_lhs {lhs.biased_exponent()};
1078-
detail::normalize<decimal128>(sig_lhs, exp_lhs);
1079-
1080-
auto sig_rhs {rhs.full_significand()};
1081-
auto exp_rhs {rhs.biased_exponent()};
1082-
detail::normalize<decimal128>(sig_rhs, exp_rhs);
1083-
1075+
10841076
#ifdef BOOST_DECIMAL_DEBUG
10851077
std::cerr << "sig lhs: " << sig_lhs
10861078
<< "\nexp lhs: " << exp_lhs
10871079
<< "\nsig rhs: " << sig_rhs
10881080
<< "\nexp rhs: " << exp_rhs << std::endl;
10891081
#endif
10901082

1091-
detail::decimal128_fast_components lhs_components {sig_lhs, exp_lhs, lhs.isneg()};
1092-
detail::decimal128_fast_components rhs_components {sig_rhs, exp_rhs, rhs.isneg()};
1083+
detail::decimal128_fast_components lhs_components {lhs.significand_, lhs.biased_exponent(), lhs.isneg()};
1084+
detail::decimal128_fast_components rhs_components {rhs.significand_, rhs.biased_exponent(), rhs.isneg()};
10931085
detail::decimal128_fast_components q_components {};
10941086

10951087
detail::d128_generic_div_impl(lhs_components, rhs_components, q_components);

0 commit comments

Comments
 (0)