fork download
  1. #include <iostream>
  2. #include <limits>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. double x = 1E-300;
  8. cout << x << endl;
  9. double y = 1E300;
  10. cout << y << endl;
  11. double z = y / x;
  12. cout << z << endl;
  13. cout << (z == std::numeric_limits<double>::infinity()) << endl;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
1e-300
1e+300
inf
1