Skip to content
Create a gist now

Instantly share code, notes, and snippets.

How to deal with Decimals.
1.9.3-p0 :005 > (BigDecimal("70") - BigDecimal("10.95")).to_s("F")
=> "59.05"
1.9.3-p0 :006 > (BigDecimal("70") - BigDecimal("40.95")).to_s("F")
=> "29.05"
1.9.3-p0 :007 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.