fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. union X
  6. {
  7. double d;
  8. uint64_t i;
  9. };
  10. X x;
  11. x.i = 4636737291354636288;
  12. cout << uint64_t(x.d) << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 5600KB
stdin
Standard input is empty
stdout
100