Skip to content

Commit e21835a

Browse files
committed
Use the new impl
1 parent 8f41872 commit e21835a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

include/boost/decimal/decimal32.hpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,6 @@ constexpr auto operator-(decimal32 lhs, decimal32 rhs) noexcept -> decimal32
944944
}
945945
#endif
946946

947-
if (!lhs.isneg() && rhs.isneg())
948-
{
949-
return lhs + (-rhs);
950-
}
951-
952947
const bool abs_lhs_bigger {abs(lhs) > abs(rhs)};
953948

954949
auto sig_lhs {lhs.full_significand()};
@@ -959,9 +954,9 @@ constexpr auto operator-(decimal32 lhs, decimal32 rhs) noexcept -> decimal32
959954
auto exp_rhs {rhs.biased_exponent()};
960955
detail::normalize(sig_rhs, exp_rhs);
961956

962-
return detail::sub_impl<decimal32>(sig_lhs, exp_lhs, lhs.isneg(),
963-
sig_rhs, exp_rhs, rhs.isneg(),
964-
abs_lhs_bigger);
957+
return detail::new_sub_impl<decimal32>(sig_lhs, exp_lhs, lhs.isneg(),
958+
sig_rhs, exp_rhs, rhs.isneg(),
959+
abs_lhs_bigger);
965960
}
966961

967962
template <typename Integer>

0 commit comments

Comments
 (0)