Hi, This looks like floating point rounding problem but it's not. Please review the following testcase: #include <stdio.h> double func(double p) { return 1.097986768 * 7654 / 4.567891000000003 + 1/p; } int main() { double PARAM = 3.0001; double aVal = func(PARAM); double bVal = func(PARAM); if (aVal > bVal) { printf("1\n"); } else { printf("0\n"); } if (func(PARAM) > func(PARAM)) { printf("1\n"); } else { printf("0\n"); } } Running this program compiled with gcc 4.1.0 (and 4.0.1 as well) prints: 0 1 First answer ("0") is right (X < X == false), but second is wrong. IMHO it is very serious problem, especially for complicated computional algorithms.
Created attachment 11769 [details] Testcase program
*** This bug has been marked as a duplicate of 323 ***