Guest User

Untitled

a guest
Jan 17th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4. int main()
  5. {
  6. double d = 1000000000000000001;
  7. cout.setf(ios::fixed);
  8. cout.precision(0); //0 - число символов после точки
  9. cout << d << endl;
  10. printf("%.0lfn",d);
  11. return 0;
  12. }
  13.  
  14. 1000000000000000000
  15. 1000000000000000000
  16.  
  17. double d1 = 1000000000000000001;
  18. double d2 = 1000000000000000000;
  19.  
  20. 0.1000000000000000055511151231257827021181583404541015625
  21.  
  22. 1 + 1.110223024625156e-16 == 1
  23.  
  24. 1 + 1.110223024625157e-16 != 1
Add Comment
Please, Sign In to add comment