Calculation of maximum and minimum expressed values ​​for the number of floating point numbers

I want to find out why the expressed numbers in the IEEE floating point standard are 10 ^ + 38 - -10 ^ 38 (and similarly for + ve). most textbooks simply make this statement of fact, im grasping why. i.e. how would you calculate this range?

Many thanks

+3
source share
1 answer

You are saying abount IEEE 754 single point (32-bit) floating point representation. In this format, the maximum value of the indicator is 127. The representation is base-2, so the maximum possible value is about 2 ^ 127. Let it convert it to decimal : 127 * log (2) / log (10) ≈ 38.23. Therefore, the maximum value represented by a 32-bit float is approx. 10 ^ 38. More information on IEEE 754 floats can be found in the related Wikipedia article.

+3
source

Source: https://habr.com/ru/post/1724492/


All Articles