10 #ifndef SRC_INCLUDE_SMASH_NUMERICS_H_
11 #define SRC_INCLUDE_SMASH_NUMERICS_H_
14 #include <initializer_list>
81 template <
typename T = std::initializer_list<
double>>
83 for (
const auto& number : collection) {
Collection of useful constants that are known at compile time.
#define unlikely(x)
Tell the branch predictor that this expression is likely false.
bool almost_equal_physics(const N x, const N y)
Same as smash::almost_equal, but for physical checks like energy-momentum conservation small_number i...
constexpr double small_number
Physical error tolerance.
bool is_any_nan(const T &collection)
This function iterates through the elements of a collection and checks if any of them is NaN using th...
constexpr double really_small
Numerical error tolerance.
bool almost_equal(const N x, const N y)
Checks two numbers for relative approximate equality.