It is a meme at this point that JavaScript sucks since it cannot even add 0.1 and 0.2 correctly. This is true, but it is not a problem with JavaScript. This is a problem with every single programming language and every single computer ever developed since they all use binary for their calculations which is why computers fail to add this correctly. In this video I will show you why this problem exists, then show you why it is important to you, before finally wrapping up with a nerdy deep dive into how computers handle floating point numbers.
Materials/References:
IEEE 754 Calculator: https://www.hschmidt.net/FloatConver...
Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
⏱ Timestamps:
00:00 Introduction
00:58 Binary Integers
04:04 Binary Decimals
05:17 The Problem With 0.1 + 0.2
07:56 Why This Is Important
10:26 Nerdy Deep Dive
#Binary #WDS #JavaScript