public static boolean notEqualWithinTolerance(double left, double right, double tolerance) {
    if (Doubles.isFinite(left) && Doubles.isFinite(right)) {
      return Math.abs(left - right) > Math.abs(tolerance);
    } else {
      return false;
    }
  }
@Test
  public void doubleNotEquals() {
    assertThat(notEqualWithinTolerance(1.3d, 1.3d, 0.00000000000001d)).isFalse();
    assertThat(notEqualWithinTolerance(1.3d, 1.3d, 0.0d)).isFalse();
    assertThat(
            notEqualWithinTolerance(0.0d, 1.0d + 2.0d - 3.0d, 0.00000000000000000000000000000001d))
        .isFalse();
    assertThat(notEqualWithinTolerance(1.3d, 1.303d, 0.004d)).isFalse();
    assertThat(notEqualWithinTolerance(1.3d, 1.303d, 0.002d)).isTrue();
    assertThat(notEqualWithinTolerance(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, 0.01d))
        .isFalse();
    assertThat(notEqualWithinTolerance(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, 0.01d))
        .isFalse();
    assertThat(notEqualWithinTolerance(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, 0.01d))
        .isFalse();
    assertThat(notEqualWithinTolerance(Double.NaN, Double.NaN, 0.01d)).isFalse();
  }