1 #ifndef GAUDIKERNEL_LOMONT_H
2 #define GAUDIKERNEL_LOMONT_H 1
12 #include "GaudiKernel/Kernel.h"
38 template <
class TYPE>
class Lomont ;
91 const unsigned short maxULPs ) ;
132 const unsigned int maxULPs ) ;
154 class Lomont<float> :
public std::binary_function<float,float,bool>
160 Lomont (
const unsigned short ulps ) : m_ulps ( ulps ) {}
165 inline bool operator () (
const float a ,
const float b )
const
176 unsigned short m_ulps ;
200 class Lomont<double> :
public std::binary_function<double,double,bool>
206 Lomont (
const unsigned int ulps ) : m_ulps ( ulps ) {}
211 inline bool operator () (
const double a ,
const double b )
const
222 unsigned int m_ulps ;
243 float next_float (
const float af ,
const short ulps ) ;
262 double next_double (
const double af ,
const short ulps ) ;
270 #endif // GAUDIKERNEL_LOMONT_H
GAUDI_API double next_double(const double af, const short ulps)
Get the floating number that representation is different with respect to the argument for the certain...
GAUDI_API float next_float(const float af, const short ulps)
Get the floating number that representation is different with respect to the argument for the certain...
GAUDI_API bool lomont_compare_double(const double af, const double bf, const unsigned int maxULPs)
equality comparison of double numbers using as the metric the maximal number of Units in the Last Pla...
Helper functions to set/get the application return code.
GAUDI_API bool lomont_compare_float(const float af, const float bf, const unsigned short maxULPs)
equality comparison of float numbers using as the metric the maximal number of Units in the Last Plac...