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 floatNotEquals() {
    assertThat(notEqualWithinTolerance(1.3f, 1.3f, 0.00000000000001f)).isFalse();
    assertThat(notEqualWithinTolerance(1.3f, 1.3f, 0.0f)).isFalse();
    assertThat(
            notEqualWithinTolerance(0.0f, 1.0f + 2.0f - 3.0f, 0.00000000000000000000000000000001f))
        .isFalse();
    assertThat(notEqualWithinTolerance(1.3f, 1.303f, 0.004f)).isFalse();
    assertThat(notEqualWithinTolerance(1.3f, 1.303f, 0.002f)).isTrue();
    assertThat(notEqualWithinTolerance(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, 0.01f))
        .isFalse();
    assertThat(notEqualWithinTolerance(Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, 0.01f))
        .isFalse();
    assertThat(notEqualWithinTolerance(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, 0.01f))
        .isFalse();
    assertThat(notEqualWithinTolerance(Float.NaN, Float.NaN, 0.01f)).isFalse();
  }