C++ float type maximum/minimum value

Description

C++ float type maximum/minimum value

#include <iostream>
#include <cfloat>

int main()/*w  w  w. j  a v a  2  s . c  o  m*/
{
  std::cout << "The mantissa for type float has " << FLT_MANT_DIG << " bits." << std::endl;
  std::cout << "The maximum value of type float is " << FLT_MAX << std::endl;
  std::cout << "The minimum non-zero value of type float is " << FLT_MIN << std::endl;
}



PreviousNext

Related