In 02.Basic_Concepts_I.pdf, on slide 94 inside the function areFloatNearlyEqual there is the following code for catching Inf or NaN arguments:
if (std::isfinite(a) || isfinite(b)) // a = ±∞, b = ±∞ and NaN
return false;
But it was causing the function to return false always, even for finite values. I think it should be:
if (!(std::isfinite(a) && std::isfinite(b))) // a = ±∞, b = ±∞ and NaN
return false;