I am coding a small app in cpp, and I need to compare floats.
I have read in many places that I need to use an epsilon.
The most common approach seems to be
static inline bool compareFloat(float x, float y) {return (fabs(x - y) < FLT_EPSILON);}
but I have read in some places that this solution is not enough. Does anyone have a real example where this approach is not enough?