Nektar++
Namespaces | Functions
RealComparison.hpp File Reference
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <LibUtilities/BasicConst/NektarUnivConsts.hpp>
#include <limits>
#include <type_traits>
#include <boost/math/special_functions/relative_difference.hpp>

Go to the source code of this file.

Namespaces

 Nektar
 The above copyright notice and this permission notice shall be included.
 
 Nektar::LibUtilities
 

Functions

template<class T1 , class T2 , class = typename std::enable_if < std::is_floating_point < typename std::remove_cv< typename std::remove_reference<T1>::type>::type >::value && std::is_same < typename std::remove_cv< typename std::remove_reference<T1>::type>::type, typename std::remove_cv< typename std::remove_reference<T2>::type>::type >::value >::type>
bool Nektar::LibUtilities::IsRealEqual (T1 &&lhs, T2 &&rhs, const unsigned int factor=NekConstants::kNekFloatCompFact)
 compare reals of same type with relative tolerance More...
 
template<class T1 , class T2 , class = typename std::enable_if < std::is_floating_point < typename std::remove_cv< typename std::remove_reference<T1>::type>::type >::value && std::is_same < typename std::remove_cv< typename std::remove_reference<T1>::type>::type, typename std::remove_cv< typename std::remove_reference<T2>::type>::type >::value >::type>
bool Nektar::LibUtilities::IsRealClose (T1 &&lhs, T2 &&rhs, const NekDouble tol=NekConstants::kNekMachineEpsilon)
 compare reals of same type with absolute tolerance More...