fork download
  1. #include <stdio.h>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main(void)
  6. {
  7. double PI1;
  8. long double PI2;
  9.  
  10. PI1 = 3.14159265358979323846264338327950288419716939937510L;
  11. PI2 = 3.14159265358979323846264338327950288419716939937510L;
  12.  
  13. cout.precision(60);
  14.  
  15. cout << "PI1 = " << PI1 << endl;
  16. cout << "PI2 = " << PI2 << endl;
  17. cout << "PI3 = 3.14159265358979323846264338327950288419716939937510" << endl;
  18. cout << "sizeof(double) = " << sizeof(double) << endl;
  19. cout << "sizeof(long double) = " << sizeof(long double) << endl;
  20. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
PI1 = 3.141592653589793115997963468544185161590576171875
PI2 = 3.14159265358979323851280895940618620443274267017841339111328
PI3 = 3.14159265358979323846264338327950288419716939937510
sizeof(double) = 8
sizeof(long double) = 12