replace FLT_EPSILON with proper C++ variant