Example for comparing two floats
- Author
- MIP
#include <Base/Common/CompareFloatingPoint.hh>
#include <iostream>
#include <limits>
using namespace std;
using namespace BIAS;
int main(){
double l=1.0e-50, r=1e-49;
cout << l<<
" == "<<r<<
" is "<<boolalpha <<
Equal(l, r) << endl;
BIAS::Less(l, -std::numeric_limits<double>::max());
return 0;
}