Pioneer
Loading...
Searching...
No Matches
Classes | Functions
FloatComparison.h File Reference
#include <SDL_stdinc.h>
#include <limits>
#include <cmath>
Include dependency graph for FloatComparison.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  IEEEFloatTraits< T >
 
struct  IEEEFloatTraits< double >
 
union  IEEEFloatTraits< double >::FloatOrInt
 
struct  IEEEFloatTraits< float >
 
union  IEEEFloatTraits< float >::FloatOrInt
 

Functions

template<typename T >
IEEEFloatTraits< T >::float_type float_abs (T x)
 
template<typename T >
IEEEFloatTraits< T >::float_type float_max (T x, T y)
 
template<typename T >
IEEEFloatTraits< T >::float_type float_max (T x, T y, T z)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_nan_bits (const typename IEEEFloatTraits< T >::uint_type &bits)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_finite_bits (const typename IEEEFloatTraits< T >::uint_type &bits)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_finite (T x)
 
bool is_equal_exact (float a, float b)
 
bool is_equal_exact (double a, double b)
 
bool is_zero_exact (float x)
 
bool is_zero_exact (double x)
 
bool is_nan (float x)
 
bool is_nan (double x)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_relative (T a, T b, T tol=IEEEFloatTraits< T >::DefaultRelTolerance())
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_absolute (T a, T b, T tol=IEEEFloatTraits< T >::DefaultAbsTolerance())
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_general (T a, T b, T rel_tol, T abs_tol)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_general (T a, T b, T tol=IEEEFloatTraits< T >::DefaultTolerance())
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_zero_general (T x, T tol=IEEEFloatTraits< T >::DefaultRelTolerance())
 
template<typename T >
IEEEFloatTraits< T >::int_type float_ulp_difference (T a, T b)
 
template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_ulps (T a, T b, typename IEEEFloatTraits< T >::int_type max_ulps=IEEEFloatTraits< T >::DefaultUlpTolerance)
 

Function Documentation

◆ float_abs()

template<typename T >
IEEEFloatTraits< T >::float_type float_abs ( x)
inline

◆ float_max() [1/2]

template<typename T >
IEEEFloatTraits< T >::float_type float_max ( x,
y 
)
inline

◆ float_max() [2/2]

template<typename T >
IEEEFloatTraits< T >::float_type float_max ( x,
y,
z 
)
inline
Here is the call graph for this function:

◆ float_ulp_difference()

template<typename T >
IEEEFloatTraits< T >::int_type float_ulp_difference ( a,
b 
)
inline

◆ is_equal_absolute()

template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_absolute ( a,
b,
tol = IEEEFloatTraits<T>::DefaultAbsTolerance() 
)
inline
Here is the call graph for this function:

◆ is_equal_exact() [1/2]

bool is_equal_exact ( double  a,
double  b 
)
inline

◆ is_equal_exact() [2/2]

bool is_equal_exact ( float  a,
float  b 
)
inline

◆ is_equal_general() [1/2]

template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_general ( a,
b,
rel_tol,
abs_tol 
)
inline
Here is the call graph for this function:

◆ is_equal_general() [2/2]

template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_general ( a,
b,
tol = IEEEFloatTraits<T>::DefaultTolerance() 
)
inline
Here is the call graph for this function:

◆ is_equal_relative()

template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_relative ( a,
b,
tol = IEEEFloatTraits<T>::DefaultRelTolerance() 
)
inline
Here is the call graph for this function:

◆ is_equal_ulps()

template<typename T >
IEEEFloatTraits< T >::bool_type is_equal_ulps ( a,
b,
typename IEEEFloatTraits< T >::int_type  max_ulps = IEEEFloatTraits<T>::DefaultUlpTolerance 
)
inline

◆ is_finite()

template<typename T >
IEEEFloatTraits< T >::bool_type is_finite ( x)
inline

◆ is_finite_bits()

template<typename T >
IEEEFloatTraits< T >::bool_type is_finite_bits ( const typename IEEEFloatTraits< T >::uint_type &  bits)
inline

◆ is_nan() [1/2]

bool is_nan ( double  x)
inline

◆ is_nan() [2/2]

bool is_nan ( float  x)
inline

◆ is_nan_bits()

template<typename T >
IEEEFloatTraits< T >::bool_type is_nan_bits ( const typename IEEEFloatTraits< T >::uint_type &  bits)
inline

◆ is_zero_exact() [1/2]

bool is_zero_exact ( double  x)
inline

◆ is_zero_exact() [2/2]

bool is_zero_exact ( float  x)
inline

◆ is_zero_general()

template<typename T >
IEEEFloatTraits< T >::bool_type is_zero_general ( x,
tol = IEEEFloatTraits<T>::DefaultRelTolerance() 
)
inline
Here is the call graph for this function: