if (x == 0.0d && y == -0.0d) return 1; if (x == -0.0d && y == 0.0d) return -1;
if (x == 0 && y == 0) return (int) (1 / x - 1 / y);
  public static int compare (double x, double y)  {    if (isNaN (x))      return isNaN (y) ? 0 : 1;    if (isNaN (y))      return -1;    if (x == 0.0d && y == -0.0d)      return 1;    if (x == -0.0d && y == 0.0d)      return -1;    if (x == y)      return 0;    return x > y ? 1 : -1;  }