BigDecimal in 1.8 vs. 1.9
When Upgrading to ruby 1.9, I have a failing test when comparing expected vs. actual values for a BigDecimal that is the result of dividing a Float. expected: '0.495E0',9(18) got: '0.4950000000 0000005E0',18(27) googling for things like "bigdecimal ruby precision" and "bigdecimal changes ruby 1.9" isn't getting me anywhere. How did BigDecimal 's behavior change in ruby 1.9? update 1 > RUBY_VERSION => "1.8.7" > 1.23.to_d => #<BigDecimal:1034630a8,'0.123E1',18(18)> > RUBY_VERSION => "1.9.3" > 1.23.to_d => #<BigDecimal:1029f3988,'0.123E1',18(45)> What does 18(18) and 18(45) mean? Precision I