Skip to content

Instantly share code, notes, and snippets.

@gm50x
Last active April 25, 2020 20:22
Show Gist options
  • Save gm50x/156313107de18342ac544a53bbc5e8e3 to your computer and use it in GitHub Desktop.
Save gm50x/156313107de18342ac544a53bbc5e8e3 to your computer and use it in GitHub Desktop.
/**
* 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