Changed FLT_MAX to numeric_limits implementation

More C++11 way.