fork download
  1. #include <iostream>
  2. #include <cfloat>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. cout << DBL_EPSILON << endl;
  8. double x = 1.0;
  9. double y = x + DBL_EPSILON;
  10.  
  11. cout << "x == y is " << ((x==y)?"True":"False") << endl;
  12. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
2.22045e-16
x == y is False