32bit signed integer values have a range of 2e9 2e9 while 32
Solution
Hi,
Floating point representation is the most common solution for scientific notation to encode numbers,with a base number and an exponent. IEEE floating point numbers having three components.
They are Sign,Exponent,Mantissa. Mantissa is a fration and an implicit leading digit.
In 32 bit the size of sign component is 1 and size of exponent component is 8 and size of mantissa component is 23. In 64 bit the size of sign,exponent,mantissa are 1,11,52 respectivly.
The size of 32bit signed integer is (2^31)-1 where as 32 bit IEEE754 floating point range is 3.4 x (10^38).
Integers with less than or equal to 6 significantdecimal digits can be converted to IEEE754 floating point value with out loss of precision.some integers upto 9 significant digits can be converted to an IEEE 754 floating point value without loss of precision, but not more than 9 digits can bestored.
Consider an example, the 32 bit integer 2,147,483,647 converts to 2,147,483,650 in IEEE 754 form.
![32-bit signed integer values have a range of ~[-2e9, 2e9], while 32-bit IEEE754 floating-point values have a range of ~[-3.4e38, 3.4e38]. How is this possible? 32-bit signed integer values have a range of ~[-2e9, 2e9], while 32-bit IEEE754 floating-point values have a range of ~[-3.4e38, 3.4e38]. How is this possible?](/WebImages/4/32bit-signed-integer-values-have-a-range-of-2e9-2e9-while-32-979583-1761502745-0.webp)