1 #ifndef ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_APPROX
2 #define ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_APPROX
57 template <typename
T> inline
bool approx (
T x_,
T y_,
T eps_);
58 template <typename
T> inline
bool relApprox (
T x_,
T y_,
T eps_);
63 template <typename
T> inline
bool eq (
T x_,
T y_,
T round_);
64 template <typename
T> inline
bool ge (
T x_,
T y_,
T round_);
65 template <typename
T> inline
bool gt (
T x_,
T y_,
T round_);
66 template <typename
T> inline
bool ne (
T x_,
T y_,
T round_);
67 template <typename
T> inline
bool lt (
T x_,
T y_,
T round_);
68 template <typename
T> inline
bool le (
T x_,
T y_,
T round_);
74 template <
typename T>
bool relApprox (
T x_,
T y_,
T eps_) {
return approx <T> (x_, y_, eps_ * y_);}
75 template <
typename T>
bool absRelApprox (
T x_,
T y_,
T tol_,
T rtol_) {
return approx <T> (x_, y_, tol_) || relApprox <T> (x_, y_, rtol_);}
79 template <
typename T>
bool eq (
T x_,
T y_,
T round_) {
return relApprox <T> (x_, y_, round_);}
80 template <
typename T>
bool ge (
T x_,
T y_,
T round_) {
return (x_ - y_) >= -(
::fabs (y_)) * round_;}
81 template <
typename T>
bool gt (
T x_,
T y_,
T round_) {
return (x_ - y_) > (
::fabs (y_)) * round_;}
82 template <
typename T>
bool ne (
T x_,
T y_,
T round_) {
return !
eq (x_, y_, round_);}
83 template <
typename T>
bool lt (
T x_,
T y_,
T round_) {
return !
ge (x_, y_, round_);}
84 template <
typename T>
bool le (
T x_,
T y_,
T round_) {
return !
gt (x_, y_, round_);}
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
#define F(x)
Make a parametrized function appear to have only one variable.
#define DBL_EPSILON
size of the next series term that indicates convergence in the log and polygamma functions
The NCBI C++/STL use hints.
const float FLT_THRESHOLD
bool le(T x_, T y_, T round_)
bool ge(T x_, T y_, T round_)
bool lt(T x_, T y_, T round_)
const double DBL_THRESHOLD
bool relApprox(T x_, T y_, T eps_)
bool approx(T x_, T y_, T eps_)
bool absRelApprox(T x_, T y_, T tol_, T rtol_)
bool eq(T x_, T y_, T round_)
bool ne(T x_, T y_, T round_)
bool gt(T x_, T y_, T round_)