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

Go to the source code of this file.

Namespaces

namespace  Nektar
 
namespace  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...