Welcome Guest.

# Double and float

Asked by: Patricia 184 views IT November 19, 2018

The range of float values ​​is -3.4*10^(-38)——3.4*10^38      or -3.4*10^38——3.4*10^38, help, thank you,

1. +2Votes  The range of values ​​is the second one, but many textbooks are written first, because the precision of floating-point numbers should also include the smallest number that can be represented. The meaning is understood

Question: Why do the textbooks write, if the exam, I want to choose which one is right.
, trouble

Answer: If the exam has such a question or choose -3.4*10^(-38)~3.4*10^38, after all, the textbooks are written like this
Strictly speaking, the value range of the float not counting symbol should be 3.4*10^(-38)~3.4*10^38, and the sign bit can be positive or negative. According to the rules of floating point numbers, it can’t really represent 0. The artificially specified mantissa all zeros means zero.

2. +2Votes  The second one, the asymmetrical thing is definitely not perfect, the imperfect thing is definitely wrong.

3. +7Votes  If you didn’t make a mistake, it’s the second one!