Skip to content

Instantly share code, notes, and snippets.

@jarmo
Created October 16, 2010 16:00
Show Gist options
  • Select an option

  • Save jarmo/629956 to your computer and use it in GitHub Desktop.

Select an option

Save jarmo/629956 to your computer and use it in GitHub Desktop.
require 'bigdecimal'
a = BigDecimal.new("1.2")
b = BigDecimal.new("1.0")
c = BigDecimal.new("0.2")
puts a - b == c
puts a * 10 - b * 10 == c * 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment