STFINV library: seek source wavelet correction filter

◆ sameineps()

bool stfinv::tools::sameineps ( const double &  a,
const double &  b,
const double &  eps = 1.e-8 
)

function to compare doubles

Parameters
aa double value
ba double value
epsrelative residual allowed for a and b
Returns
true if relative residual between a and b is smaller than eps

Definition at line 46 of file tools.cc.

47  {
48  double reldif=std::abs(a-b);
49  return(reldif<=(std::abs(b*eps)));
50  } // bool sameineps(const double &a, const double& b, const double& eps)