views:

217

answers:

1

I know that the min and values are: 3.362... 10-4932 1.189... 10+4932 and log(2^14)~4932 which gives me the exponential part. But I can't figure out mantissa.

A: 

Mantissa has an implicit beginning one bit. This avoids wasting one bit of storage for the bit which is always one (except for reduced floats, which are a special case when all exponent bits are zero).

Notice that the implicit first digit is only possible in binary. E.g. in decimal you might have 3.14e+2 and you cannot just drop the first digit (3) because you wouldn't know which number (1-9 it was anymore.

For example, a floating point value seeemmmmm would be read as (in C-style pseudo code)

(s ? -1 : 1) * ((binary)1mmmmm << ((binary)eee - bias));

Where bias is a constant for this particular floating-point type so that all exponent values (eee) can be positive and 000 is the most negative exponent.

So, you can calculate the maximum value by 0b111111 (one more bit than there is in the mantissa) shifted by the maximum value (unbiased) of the exponent. The minimum value is the same with a negative sign.

Tronic
OK so the max value for this IEEE standard should be 1.11111...1 (with 64 one's after period) in binary format, which is almost 2 in decimal. but 2 is nothing like 1.189 above.Also min and max values seem to have different mantissas.P.S. that should be (2^14) * log(2) ~ 4932
AtoMerZ