fine tune

This commit is contained in:
krahets
2023-09-17 01:13:15 +08:00
parent b2246e11a7
commit 9f59c572b5
32 changed files with 44 additions and 44 deletions

View File

@ -88,7 +88,7 @@ $$
## 浮点数编码
细心的你可能会发现:`int``float` 长度相同,都是 4 bytes但为什么 `float` 的取值范围远大于 `int` ?这非常反直觉,因为按理说 `float` 需要表示小数,取值范围应该变小才对。
细心的你可能会发现:`int``float` 长度相同,都是 4 bytes ,但为什么 `float` 的取值范围远大于 `int` ?这非常反直觉,因为按理说 `float` 需要表示小数,取值范围应该变小才对。
实际上,**这是因为浮点数 `float` 采用了不同的表示方式**。记一个 32-bit 长度的二进制数为: