Dear Brian,
you can avoid floating point problems altogether if you use fractions
in your calculations.
To do this, you can use the programme "rational.rb" which is
part of ruby1.8.2 like this:
require "rational.rb"
my_result=9-Rational(89,10)
gives my_result=Rational(1,10) (i.e. 1/10).
There is documentation on the methods available on
_http://www.ruby-doc.org/stdlib/libdoc/rational/rdoc/files/rational_rb.html_
(http://www.ruby-doc.org/stdlib/libdoc/rational/rdoc/files/rational_rb.html)
Best regards,
Axel