fork download
  1. #include <iostream>
  2. #include <limits>
  3. #include <cstdint>
  4.  
  5. int main()
  6. {
  7. using namespace std;
  8. cout << "Precision of each data type: " << endl
  9. << "double: " << numeric_limits<double>::digits << endl
  10. << "uint64_t: " << numeric_limits<uint64_t>::digits << endl
  11. << endl;
  12.  
  13. cout << "Limit of each data type: " << endl
  14. << "double: " << numeric_limits<double>::max() << endl
  15. << "uint64_t: " << numeric_limits<uint64_t>::max() << endl
  16. << endl;
  17. }
  18.  
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
Precision of each data type: 
double: 53
uint64_t: 64

Limit of each data type: 
double: 1.79769e+308
uint64_t: 18446744073709551615