Last active
April 25, 2020 20:22
-
-
Save gm50x/156313107de18342ac544a53bbc5e8e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Demonstrating Imprecision | |
*/ | |
let n = 1.22 | |
while (n && n > 0) { | |
let m = n; | |
n = n - 0.01 | |
console.log(`${m} - ${0.01} = ${n}`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment