Created
December 17, 2019 15:59
-
-
Save akem3210/a47ef80ffa22d390dce1586aa9c4ae69 to your computer and use it in GitHub Desktop.
Precision errors?
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
akem@akem-HP:~$ ruby -e "0.step(1, 0.1){ |i| puts i }" | |
0.0 | |
0.1 | |
0.2 | |
0.30000000000000004 | |
0.4 | |
0.5 | |
0.6000000000000001 | |
0.7000000000000001 | |
0.8 | |
0.9 | |
1.0 | |
akem@akem-HP:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment