The operator==() method for json objects uses '==' on the underlying number_float_t type. This may result in false negatives and is contrary to the function's documentation which states "Floating-point numbers are compared indirectly: two floating-point numbers f1 and f2 are considered equal if neither f1 > f2 nor f2 > f1 holds". Could this behavior be changed to abs(f1 - f2) < std::numeric_limits<number_float_t>::epsilon() ?
The operator==() method for json objects uses '==' on the underlying number_float_t type. This may result in false negatives and is contrary to the function's documentation which states "Floating-point numbers are compared indirectly: two floating-point numbers
f1andf2are considered equal if neitherf1 > f2norf2 > f1holds". Could this behavior be changed toabs(f1 - f2) < std::numeric_limits<number_float_t>::epsilon()?