fuzzyCompare

#include <algorithm>
#include <cmath>
#include <limits>

template <class T>
constexpr auto fuzzyCompare(T f1, T f2) noexcept -> bool {
    constexpr auto epsilon {std::numeric_limits<T>::epsilon()} ;
    return std::abs(f1 - f2) <= epsilon ? true
           : std::abs(f1 - f2) <= epsilon * std::max(std::abs(f1), std::abs(f2));
}