Including the hidden bit, how many decimal digits can the mantissa of a 32-bit floating-point number accurately represent?

2016-01-07 10:18 pm

回答 (3)

2016-01-07 11:59 pm
✔ 最佳答案
32 bit floating point numbers use

1 bit for the sign
8 bits for the exponent
23 bits for the mantissa.

2^23 = 8388608

Since the most significant digit cannot exceed 8, then this cannot be accurately represented. So the remaining 6 digits are the only ones that can be defined accurately.

Only 6 decimal digits can be accurately represented.

I hope this helps.
2016-01-07 10:54 pm
An IEEE 754 format "single precision" float stored as 32 bits has a precision of 24 bits or a minimum of six decimal digits.

Officially it's "Six to nine digits" precision - there is no absolute for it as 24 bits does not match a power-of-ten decimal value.

More info below:
https://en.wikipedia.org/wiki/Single-precision_floating-point_format
2016-01-07 10:21 pm
"Including the hidden bit, how many decimal digits can the mantissa of a 32-bit floating-point number accurately represent?"

It depends on the encoding scheme. A SHORT FLOAT is usually good to something like 5-7 sig figs, where a 32-bit integer would be good for lots more


收錄日期: 2021-04-21 16:11:42
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20160107141844AANBcz2

檢視 Wayback Machine 備份