Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What numbers can real data, float and double refer to in C language? What is a real type?
What numbers can real data, float and double refer to in C language? What is a real type?

Real type variables are divided into three categories: single precision (float type), double precision (double type) and long double precision (long double type).

a=33333.33333; b=33333.33333333333333;

Since a is a single-precision floating point type, there are only seven significant digits. The integer already occupies five digits, so all the numbers after the two decimal places are invalid.

b is a double precision type with sixteen valid digits. However, VC6.0 stipulates that a maximum of six decimal places should be retained, and the remaining parts should be rounded off.

Note: Real-type constants are not divided into single-precision and double-precision, and are all processed as double-precision double types.

In C language, the real number type and the floating point number type actually mean the same thing