Skip to content

Commit

Permalink
Fix sign with fast math
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Jun 11, 2024
1 parent 3f9aaba commit b8e0a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/decimal/decimal64_fast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,14 +1131,14 @@ constexpr auto operator*(Integer lhs, decimal64_fast rhs) noexcept

constexpr auto d64_fast_div_impl(decimal64_fast lhs, decimal64_fast rhs, decimal64_fast& q, decimal64_fast& r) noexcept -> void
{
const bool sign {lhs.isneg() != rhs.isneg()};

#ifndef BOOST_DECIMAL_FAST_MATH
// Check pre-conditions
constexpr decimal64_fast zero {0, 0};
constexpr decimal64_fast nan {boost::decimal::direct_init_d64(boost::decimal::detail::d64_fast_snan, 0, false)};
constexpr decimal64_fast inf {boost::decimal::direct_init_d64(boost::decimal::detail::d64_fast_inf, 0, false)};

const bool sign {lhs.isneg() != rhs.isneg()};

const auto lhs_fp {fpclassify(lhs)};
const auto rhs_fp {fpclassify(rhs)};

Expand Down

0 comments on commit b8e0a1b

Please sign in to comment.