Floating point reductions that start at an integer value and only get
incremented by another positive integer value can be performed on
integers. The result then needs to be clamped by the maximum value value
with mantissa 1.0 (with the maximum exponent) times the step.
This approach has been suggested by @scanon.
One thing I am not sure about is if there is an API to get the
corresponding integer value of a APFloat, if it is an integer. The patch
does same manual matching against explicitly constructed APFloats.
Another thing to note is that the patch uses float->signed int/signed
int->float conversions. Should conversions to unsigned be used?
Should half be supported too?