|
|
|
|
|
by xyzzy_plugh
1669 days ago
|
|
The binary form is important to understand the implementation details. You even mention underflow. It's difficult for most people to initially understand why you can't store a large number that can be represented by an equivalent size integer as a float accurately. The binary form handily demonstrates the limitations. Understanding the floating point instructions is kinda optional but still valuable. Otherwise everyone should just use varint-encoded arbitrary precision numbers. |
|
[a]: Sure, if you `console.log(0.1)`, you'll get 0.1, but it's not possible to express it in binary exactly; only after rounding. 0.5, however, is exactly representable.