Skip to content

Commit 8e9613b

Browse files
committed
Simplify operator+
1 parent eb8448d commit 8e9613b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

include/boost/decimal/decimal128_fast.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -781,17 +781,9 @@ constexpr auto operator+(decimal128_fast lhs, decimal128_fast rhs) noexcept -> d
781781
return lhs - abs(rhs);
782782
}
783783

784-
auto lhs_sig {lhs.full_significand()};
785-
auto lhs_exp {lhs.biased_exponent()};
786-
detail::normalize<decimal128>(lhs_sig, lhs_exp);
787-
788-
auto rhs_sig {rhs.full_significand()};
789-
auto rhs_exp {rhs.biased_exponent()};
790-
detail::normalize<decimal128>(rhs_sig, rhs_exp);
791-
792784
const auto result {detail::d128_add_impl<detail::decimal128_fast_components>(
793-
lhs_sig, lhs_exp, lhs.sign_,
794-
rhs_sig, rhs_exp, rhs.sign_)};
785+
lhs.significand_, lhs.biased_exponent(), lhs.sign_,
786+
rhs.significand_, rhs.biased_exponent(), rhs.sign_)};
795787

796788
return {result.sig, result.exp, result.sign};
797789
};

0 commit comments

Comments
 (0)