Max float introduced in IEEE 754

I am wondering if the max float is represented in IEEE 754:

(1.11111111111111111111111)_b*2^[(11111111)_b-127]

Here _bmeans binary representation. But this value 3.403201383*10^38, which is different from 3.402823669*10^38that (1.0)_b*2^[(11111111)_b-127]and set, for example c++ <limits>. not (1.11111111111111111111111)_b*2^[(11111111)_b-127]conceivable and more within?

Does anyone know why?

Thank.

+6
source share
2 answers

Indicator 11111111 b reserved for infinity and NaN, so your number cannot be represented.

The largest value that can be represented in single precision, approximately 3.4028235 Γ— 10 38 is actually 1.1111111111111111111111111 b Γ— 2 11111110 b > -127.

. http://en.wikipedia.org/wiki/Single-precision_floating-point_format

+7

" " " " , :

enter image description here

, IEEE 754 :

  • 16 1 , 6 11 . 4 293 918 720 .
  • 32 1 , 8 23 . - 3.402823466E38.
  • 64 1 , 11 52 . - 2 ^ 1024 - 2 ^ 971
0
source

All Articles