On 18 July 2011 16:19, Samuel Kadolph <samuel / kadolph.com> wrote:

> This is how floating point math works. If you want exact values use
> decimals.
> http://en.wikipedia.org/wiki/Floating_point
>
>

Thanks Samuel for the tip about decimals

I've then found an old discussion in the ruby forums about float and
decimals - see http://www.ruby-forum.com/topic/208222