Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donpdonp/c36b33b861cea49c0a86 to your computer and use it in GitHub Desktop.
Save donpdonp/c36b33b861cea49c0a86 to your computer and use it in GitHub Desktop.
donp@wafer:~$ /usr/local/ruby/2.0.0-p247/bin/irb -rbigdecimal
irb(main):001:0> 0.07/0.1
=> 0.7000000000000001
irb(main):002:0> BigDecimal.new("0.07")/BigDecimal.new("0.1")
=> #<BigDecimal:7fc319c623c8,'0.7E0',9(27)>
donp@wafer:~$ /usr/local/ruby/2.1.0-p0/bin/irb -rbigdecimal
irb(main):001:0> 0.07/0.1
=> 0.7000000000000001
irb(main):002:0> BigDecimal.new("0.07")/BigDecimal.new("0.1")
=> #<BigDecimal:7faaa00113f8,'0.0',9(18)>
irb(main):003:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment