i'm working on a project and to finish it i need to do some comparison with double, float ... the problem is when i compare two double which are respectively the biggest value for a double and the biggest value for a double + 1, the comparison fail ... i do
if (std::max(d_max + 1.1, (d_max)) == d_max)
std::cout << "bad" << std::endl;
the answer of the function max is d_max and "bad" is displayed ... is anyone having an idea or a solution to get a good precision with my comparison ? i checked on google but i found out more explanations than real solution to my problem ... thanks so much !