Ported in dipstick's workarounds.
Bashed std:: where unnecessary.
Added int conversions and float comparisons.

Int conversions are very similar to make_unsigned and make_signed,
but they take a param to decide to add or remove signedness and
work solely on type size.

Float comparisons use uint conversions to compare by ulps.