C - 32-bit real number: float

32-bit real number and his value range: from -3.4 × 10 on 38 to +3.4 × 10 on 38 and it has 7 digit precision. this means that it is true that we can into it save big numbers but we must calculate that over number 7 will be rounding. for example, it can be used for storing large numbers, where are not so important the smaller parts, or in the case of small integers with a fraction. if it is used to store integers the biggest integer what can store without rounding is 2 on 24. 32-bit real number is stored the following way: 1bit sign, 8bit exponent and 23bit mantissa.



Used keywords: float
Note: In C like languages the data type size may be different depending on compiler and architecture, we show only one standard look.



32-bit real number the possible of use:
float x = 3.14159265359;  // x = 3.14159274
float y = 123456789;      // y = 123456792.0
y =(float)(x * y);       // z = 387850976.0


Other pieces of example codes:
(float)(x * 2)

You can find it in the following collections: real numbers | numbers | data types
Languages: en hu cz sk