The three floating-point types are:
float
-32 bits
double
-64 bits
long double
(OpenVMS Alpha)-128 bits by default, with the option
for 64 bits
long double
(Digital UNIX)-64 bits in current versions of Digital
UNIX
long double
(VAX)-64 bits
Use the floating-point types for variables, constants, and function return values with fractional parts, or where the value exceeds the storage range available with the integral types. The following examples show sample floating-point type declarations (and initializations):
float x = 35.69; double y = .0001; double z = 77.0e+10; float Q = 99.9e+99; /* Exceeds allowable range */