Change x from an integer to a floating point with the to_f method from the Fixnum class
x = 100 x.to_f # => 100.0