use FLT_MAX in safe_float functions