fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. double x = fabs(sqrt(2.0) - sqrt(2.0001));
  10. cout << x << "\n";
  11. cout << setprecision(10) << fixed << x << '\n';
  12. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
3.53549e-05
0.0000353549