diff --git a/sprout/math/is_odd.hpp b/sprout/math/is_odd.hpp index 1b29f59c..6e8f6866 100644 --- a/sprout/math/is_odd.hpp +++ b/sprout/math/is_odd.hpp @@ -33,7 +33,7 @@ namespace sprout { inline SPROUT_CONSTEXPR bool is_odd(FloatType x) { return sprout::math::isfinite(x) - && sprout::math::detail::is_odd_unchecked(x) + && sprout::math::detail::is_odd_unchecked(x < 0 ? -x : x) ; } } // namespace math