Every time I start a new project and when I need to compare some float or double variables I write the code like this one:
if (fabs(prev.min[i] - cur->min
The Standard provides an epsilon value. It's in and you can access the value by std::numeric_limits::epsilon and std::numeric_limits::epsilon. There are other values in there, but I didn't check what exactly is.
std::numeric_limits::epsilon