OK something weird happened to me I did the following equality comparison in Nodejs
and surprisingly it replied with true
.
(2 ** 64) - 1000 === (2 ** 64) // true
Why is that?
> for (let i = 0; i<=20; i++)
... console.log(i, (2 ** 64) - (2 ** i) === (2 ** 64))
0 true
1 true
2 true
3 true
4 true
5 true
6 true
7 true
8 true
9 true
10 true
11 false
12 false
13 false
14 false
15 false
16 false
17 false
18 false
19 false
20 false