Created
August 21, 2018 10:04
-
-
Save mattocchi/f0e54cbafbbd76df595947e9db21885e to your computer and use it in GitHub Desktop.
Errori Arrotondamento Float
This file contains hidden or 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
var x = .3 - .2; // trenta centesimi meno venti centesimi | |
var y = .2 - .1; // venti centesimi meno dieci centesimi | |
x == y; // => false | |
x == .1; // => false: .3-.2 non è uguale a .1 | |
y == .1 // => true: .2-.1 è uguale a .1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment