Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. std::cout << sizeof(float) << "n"; // this gives 4 on my machine "debian 64 bit" with "gcc 6.3.0"
  2. std::cout << std::numeric_limits<float>::digits10 << "n"; // gives 6
  3.  
  4.  
  5. std::cout << sizeof(double) << "n"; // gives 8
  6. std::cout << std::numeric_limits<double>::digits10 << "n"; // gives 15
  7.  
  8. std::cout << sizeof(long double) << "n"; // gives 16
  9. std::cout << std::numeric_limits<long double>::digits10 << "n"; // gives 18
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement