Use cfloat to get FLT_MAX instead of needing numeric_limits