Floating point comparison in STL, BOOST
- by Paul
Is there in the STL or in Boost a set of generic simple comparison functions?
The one I found are always requiring template parameters, and/or instantiation of a
struct template.
I'm looking for something with a syntax like :
if ( is_greater(x,y) )
{
...
}
Which could be implemented as :
template <typename T>
bool is_greater(const T& x, const T& y)
{
return x > y + Precision<T>::eps;
}