Unfortunately, due to network issues, we are forced to reschedule the round. Let's do it in the coming days. Apologize. ×

TranThuyLuc's blog

By TranThuyLuc, 6 years ago,

In many contest problems in Codeforces where the results require float point number, there is often something like this:

However, the normal way to check whether two float point numbers are equal is something like this:

const double EPS = 1e-9;

bool isEqual(double x, double y){
return abs(x - y) < EPS;
}


Is the way Codeforces use more precise? Should I use this way for comparing float point numbers instead of the normal way?

• +8