Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
- require 'bigdecimal'
- 10000.times do
- b = BigDecimal.new(1000+Random.rand(5000)) / 100
- # b.class => BigDecimal
- (b**0.75).floor # _sometimes_ raises TypeError: #<Class:0x000000277a3a38> can't be coerced into BigDecimal
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement