Skip to content

Commit

Permalink
Update 2019-08-01.md
Browse files Browse the repository at this point in the history
  • Loading branch information
azl397985856 authored Nov 24, 2019
1 parent a2099d6 commit 521fe24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/daily/2019-08-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ JavaScript 的 Number 类型使用 52 位表示小数位,11 位表示指数位
因此指数部分最大值为`2^11 - 1 = 2047`。当指数部分全部是1的时候,实际上表示的数字是`NaN,Infinite或者-Infinite`


因此对于 Number 的范围,应该是 `2^1024`,正数和负数各一半, 也就是`1.7976931348623157e+308`.
因此最大值为2^1023 * (1 * 2^0 + 1 * 2^-1 + ... + 1 * 2^-52),也就是2^971 * (2^53 - 1),这个值就是javascript能表示的最大数字1.7976931348623157e+308

> 这个数字在计算器中是打印不出来的, 至于原因,大家自己想一下。
其实我们可以稍微估算一下`2 ^ 1024`的值。
这个数字非常接近`2^1024` ,其实我们可以稍微估算一下`2 ^ 1024`的值。

```
log(2^1024) = 1024*log(2) = 1024 * 0.30102999566398114 = 308.2547155599167
Expand Down

0 comments on commit 521fe24

Please sign in to comment.