9 #ifndef FLOATINGPOINTCOMPARISSON_HPP_
10 #define FLOATINGPOINTCOMPARISSON_HPP_
25 return( ( ( a < static_cast< double >( 0 ) )? -a : a ) );
40 assert( f1 >= static_cast< double >( 0 ) );
41 assert( f2 >= static_cast< double >( 0 ) );
50 if( f1 == static_cast< double >( 0 ) ||
52 return static_cast< double >( 0 );
70 bool predicate1 = (d1 <=
TOL);
71 bool predicate2 = (d2 <=
TOL);
73 if( (predicate1 || predicate2) )
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
double AbsoluteValue(double a)
Returns the absolute value of the value a.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
double ___safe_fpt_division(const double f1, const double f2)
Performs a safe floating point division f1/f2.
bool fpointequals(const double a, const double b, double TOL=1e-9)
Checks if two floating numbers are "nearly" equal.