Why 0.1 + 0.2 === 0.30000000000000004: Implementing IEEE 754 in JS

Why 0.1 + 0.2 === 0.30000000000000004: Implementing IEEE 754 in JS

70.117 Lượt nghe
Why 0.1 + 0.2 === 0.30000000000000004: Implementing IEEE 754 in JS
Floating point math is tricky. In this video, we'll learn how these numbers work in computers, and build a software implementation from scratch in JavaScript. =[ 🔗 Links 🔗 ]= - ⭐️ Patreon: https://www.patreon.com/lowleveljavascript - 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript - Floating Point Arithmetic: https://en.wikipedia.org/wiki/Floating-point_arithmetic - 16 Bit Floats: https://en.wikipedia.org/wiki/Half-precision_floating-point_format - IEEE 754 Spec: https://ieeexplore.ieee.org/document/30711 - Fabien Sanglard's awesome blog on the subject: http://fabiensanglard.net/floating_point_visually_explained/ - Denormalised Numbers: https://en.wikipedia.org/wiki/Denormal_number - Github Repo: https://github.com/LowLevelJavaScript/Floating-Point-Implemented-In-JS