fork(1) download
  1. #include <iostream>
  2.  
  3. int roundtrip(int x)
  4. {
  5. return int(float(x));
  6. }
  7.  
  8. int main()
  9. {
  10. int a = 2147483583;
  11. int b = 2147483584;
  12. std::cout << a << " -> " << roundtrip(a) << '\n';
  13. std::cout << b << " -> " << roundtrip(b) << '\n';
  14. }
  15.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
2147483583 -> 2147483520
2147483584 -> 2147483647