15 #ifndef ARITHMETIC__FLOATING_POINT__COMPARISON_HPP_
16 #define ARITHMETIC__FLOATING_POINT__COMPARISON_HPP_
28 return std::abs(a - b) <=
29 (std::numeric_limits<T>::epsilon() * std::max(std::abs(a), std::abs(b)));
35 return std::abs(a - b) <=
36 (std::numeric_limits<T>::epsilon() * std::min(std::abs(a), std::abs(b)));
39 template <
typename T,
typename... Ts>
42 auto compare = [](T a, T b) {
43 return (b - a) > (std::numeric_limits<T>::epsilon() * std::max(std::abs(a), std::abs(b)));
46 if constexpr (0 <
sizeof...(Ts)) {
47 return compare(a, b) and compare(b,
xs...);
56 return (a - b) > (std::numeric_limits<T>::epsilon() * std::max(std::abs(a), std::abs(b)));
auto isDefinitelyGreaterThan(T a, T b)
Definition: comparison.hpp:54
auto isApproximatelyEqualTo(T a, T b)
Definition: comparison.hpp:26
auto isEssentiallyEqualTo(T a, T b)
Definition: comparison.hpp:33
auto isDefinitelyLessThan(T a, T b, Ts... xs)
Definition: comparison.hpp:40
Definition: bounding_box.hpp:32
Definition: junit5.hpp:25