public static boolean isEqual(double d1,double d2){
  return Math.abs(d1 - d2) < TOLERANCE;
}

public static boolean isEqual ( double d1 , double d2 ) { return Math . abs ( d1 - d2 ) < TOLERANCE ; }
tests whether the two decimal numbers are equal with a tolerance of 0 . 01 .
