BigDecimal#to_f is accurate, it returns exact nearest float value, but may be extremely slow in some case.
irb(main):003> x = BigDecimal(1).div(7, 10000); 10000.times{(x - it).to_f}
processing time: 1.746866s
=> 10000
irb(main):004> x = BigDecimal(1).div(7, 10000); 10000.times{(x - it).mult(1, 20).to_f}
processing time: 0.053746s
If BigDecimal#to_f is optimized, we can remove workaround like #514