@Test public void floatIsZero() { float x = CompareOp.FTOL / 2; assertTrue(CompareOp.isZero(x)); assertTrue(CompareOp.isZero(-x)); x = CompareOp.FTOL * 2; assertFalse(CompareOp.isZero(x)); }
public static boolean isZero(double x) { return Math.abs(x) < DTOL; }
CompareOp { public static boolean isZero(double x) { return Math.abs(x) < DTOL; } }
CompareOp { public static boolean isZero(double x) { return Math.abs(x) < DTOL; }  }
CompareOp { public static boolean isZero(double x) { return Math.abs(x) < DTOL; }  static boolean isZero(double x); static boolean isZero(float x); static boolean isZero(double x, double tol); static boolean isZero(float x, float tol); static int acompare(double x1, double x2); static int acompare(float x1, float x2); static int acompare(double x1, double x2, double tol); static int acompare(float x1, float x2, float tol); static int pcompare(double x1, double x2, double propTol); static int pcompare(float x1, float x2, float propTol); static boolean aequal(double x1, double x2); static boolean aequal(float x1, float x2); static boolean aequal(double x1, double x2, double tol); static boolean aequal(float x1, float x2, float tol); static boolean pequal(double x1, double x2, double propTol); static boolean pequal(float x1, float x2, float propTol); }
CompareOp { public static boolean isZero(double x) { return Math.abs(x) < DTOL; }  static boolean isZero(double x); static boolean isZero(float x); static boolean isZero(double x, double tol); static boolean isZero(float x, float tol); static int acompare(double x1, double x2); static int acompare(float x1, float x2); static int acompare(double x1, double x2, double tol); static int acompare(float x1, float x2, float tol); static int pcompare(double x1, double x2, double propTol); static int pcompare(float x1, float x2, float propTol); static boolean aequal(double x1, double x2); static boolean aequal(float x1, float x2); static boolean aequal(double x1, double x2, double tol); static boolean aequal(float x1, float x2, float tol); static boolean pequal(double x1, double x2, double propTol); static boolean pequal(float x1, float x2, float propTol); static final double DTOL; static final float FTOL; }