Skip to content

Instantly share code, notes, and snippets.

@oriolgual
Created December 13, 2010 11:37
Show Gist options
  • Save oriolgual/738924 to your computer and use it in GitHub Desktop.
Save oriolgual/738924 to your computer and use it in GitHub Desktop.
adding_floats.rb
ruby-1.9.2-p0 > 2.10 + 0.24
=> 2.34
ruby-1.9.2-p0 > 2.11 + 0.24
=> 2.3499999999999996 # FFFFFUUUUUU-
ruby-1.8.7-p302 > 2.10 + 0.24
=> 2.34
ruby-1.8.7-p302 > 2.11 + 0.24
=> 2.35 # Better than expected :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment