Skip to content

Instantly share code, notes, and snippets.

@liushooter
Forked from clemens/test.rb
Created November 26, 2013 03:21
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 liushooter/7653000 to your computer and use it in GitHub Desktop.
Save liushooter/7653000 to your computer and use it in GitHub Desktop.
>> require 'bigdecimal'
=> true
>> require 'bigdecimal/util'
=> true
>> BigDecimal('40.30') == 40.3
=> true
>> BigDecimal('40.90') == 40.9
=> true
>> BigDecimal('40.10') == 40.1
=> true
>> BigDecimal('49.10') == 49.1
=> true
>> BigDecimal('69.10') == 69.1
=> false
# WTF?!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment