If the above change is made, the expression will return a float, and there will be no need to .to_f the whole expression.