From: Sam Kong Date: 2009-10-06T05:15:04+09:00 Subject: Re: BigDecimal to float error On Oct 5, 1:02 pm, Sam Kong wrote: > Hi, > > I found a weird problem. > > In ruby 1.8.5, I get the following result in irb. > > BigDecimal.new("86.02").to_f #=> 86.2 > > I don't know if this is a ruby bug or machine bug. > In ruby 1.8.6 on a different machine, it's ok. > > Is this a known issue? > > Sam I narrowed down the problem. It has nothing to do with converting to float. irb(main):023:0> BigDecimal.new("1.0234") => # The internal representation is wrong. Will upgrading ruby fix this problem?