MCPcopy Create free account
hub / github.com/ArashPartow/exprtk / not_equal_impl

Function not_equal_impl

exprtk_test.cpp:1132–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130
1131template <typename T>
1132inline bool not_equal_impl(const T& t1,
1133 const T& t2,
1134 const T& epsilon = 0.0000000001/*std::numeric_limits<T>::epsilon()*/)
1135{
1136 if (t1 != t1) return true;
1137 if (t2 != t2) return true;
1138 T diff = std::abs(t1 - t2);
1139 T eps_norm = (std::max(T(1),std::max(std::abs(t1),std::abs(t2))) * epsilon);
1140 return diff > eps_norm;
1141}
1142
1143template <typename T>
1144inline bool not_equal(const T& t0, const T& t1,

Callers 1

not_equalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected