method

to_f

ruby latest stable - Class: Integer
to_f()
public

Converts int to a Float. If int doesn’t fit in a Float, the result is infinity.