require 'rational'require 'mathn'rat = Rational(25/100) # => 1/4 -- lowest termsrat.inspect # => "1/4"rat.to_s # => "1/4"rat.to_f # => 0.25p rat # => 1/4