C++ examples for Data Type:float
Get the float maximum/minimum value
#include <iostream> #include <cfloat> int main()/* w w w . j a va2 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; }