double a, b; ... if (a == b) /* 錯! */
#include <math.h> if (fabs(a - b) <= epsilon * fabs(a))
參考資料: [Knuth, Sec. 4.2.2 pp. 217-8]。