First of all I want to show my source:
Data Type Ranges (C++)
I am trying to figure out ranges.
A float's model
((-1)^a)*b*2^c
For a float:
1 bit for sign (a)
8 bits for bias (b)
23 bits for mantissa (c)
The range for the bias: [-127,128]
The maximum point for the term has c
Min:2^-127 ~= -5.877e-39
Max:2^128 ~= 3.4e38
For term b:
The mantissa is that:
1+b1*2^-1+b2*2^-2+...+b8*2^-8
bmax== 2^1-2^-8~=2
Then isn't the range of the float that one?
[-2*3,4e38,2*3,4e38]
1. It seems like they have ignored the value of 128 for the bias. Are they right?
2. It seems they have also ignored the negative values. Cannot we use negative floats? It seems I can.