fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x = 0/0.0;
  7. cout << x<<endl;
  8. cout << hex << *(long *)(&x)<<endl;
  9. double w = nan("");
  10. cout << hex << *(long *)(&w)<<endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
-nan
fff8000000000000
7ff8000000000000