fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. float a = 1.234567E-7;
  7. float b = 1.000000;
  8. float c = -b;
  9. float s1 = a+b;
  10. cout << s1 << endl; // Konsolenausgabe: 1
  11. s1 += c;
  12. cout << s1 << endl; // Konsolenausgabe: 1.19209e-07
  13. cout << c + b + a << endl; // Konsolenausgabe: 1.23457e-07
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
1
1.19209e-07
1.23457e-07