ruby floating point division code example Example: ruby division floating decimal 9.to_f / 5 #=> 1.8 9 / 5.to_f #=> 1.8