On Jan 24, 2012, at 9:01 AM, Peter Vandenabeele wrote:
> Ha, just discovering the 'to_d' function in 'bigdecimal/util'
> 1.9.3p0 :005 > a/b =3D=3D 7.89.to_d
> =3D> true
> 1.9.3p0 :006 > 1.234567890123.to_d

Be careful with these last two.  The Float =3D> BigDecimal
conversion that is happening with to_d is doing some rounding:

("%.60f" % 7.89) #=3D> =
"7.889999999999999680255768907954916357994079589843750000000000"
("%.60f" % 7.89).to_d =3D=3D "7.89".to_d #=3D> false

Gary Wright              =20