Make better use of the type range when converting from float