Go to the documentation of this file. 52 #define Max(a, b) (((a) >= (b)) ? (a) : (b)) 55 #define Min(a, b) (((a) <= (b)) ? (a) : (b)) 58 #define EPS_ZERO (DBL_EPSILON * 1e4) 59 #define EPS_ZERO_HARD (DBL_EPSILON * 1e6) 63 #define Fsgn(x) ((((x) > -EPS_ZERO) && ((x) < EPS_ZERO)) ? 0 : (((x) < 0.0) ? -1 : 1)) 67 #define RELDIFF(a, b) (((a)-(b))/ MAX(MAX(fabs(a), fabs(b)), 1.0)) 68 #define EQ_FEAS(a, b) (fabs(RELDIFF(a, b)) <= EPS_ZERO) 69 #define LT_FEAS(a, b) (RELDIFF(a, b) < -EPS_ZERO) 70 #define LE_FEAS(a, b) (RELDIFF(a, b) < EPS_ZERO) 71 #define GT_FEAS(a, b) (RELDIFF(a, b) > EPS_ZERO) 72 #define GE_FEAS(a, b) (RELDIFF(a, b) > -EPS_ZERO) 73 #define EQ_FEAS_EPS(a, b, eps) (fabs(RELDIFF(a, b)) <= eps) 74 #define LT_FEAS_EPS(a, b, eps) (RELDIFF(a, b) < -eps) 75 #define LE_FEAS_EPS(a, b, eps) (RELDIFF(a, b) < eps) 76 #define GT_FEAS_EPS(a, b, eps) (RELDIFF(a, b) > eps) 77 #define GE_FEAS_EPS(a, b, eps) (RELDIFF(a, b) > -eps) 79 #define EQ(a, b) (fabs((a) - (b)) <= EPS_ZERO) 80 #define NE(a, b) (fabs((a) - (b)) > EPS_ZERO) 81 #define LT(a, b) (((a) - (b)) < -EPS_ZERO) 82 #define LT_HARD(a, b) (((a) - (b)) < -EPS_ZERO_HARD) 83 #define LE(a, b) (((a) - (b)) < EPS_ZERO) 84 #define GT(a, b) (((a) - (b)) > EPS_ZERO) 85 #define GE(a, b) (((a) - (b)) > -EPS_ZERO) 86 #define GE_HARD(a, b) (((a) - (b)) > -EPS_ZERO_HARD) 88 #if defined(MSDOS) || defined(WIN32)