Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释我们如何计算十六进制浮点常数的值。我在看书,发现 0x0.3p10 代表值 192。
指数仍以十进制表示,但底数为 2,尾数为十六进制。
所以 0.3P10 是 (3 × 16 -1 ) × 2 10,即 3/16 × 2 10,即 3 × 2 6 = 192。
由于 16 = 2 4,尾数的每个十六进制数字都会吞噬四个单位的指数。