Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testLog2Accuracy (0.2 sec)

  1. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

                  && StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          assertEquals(expected, DoubleMath.isPowerOfTwo(x));
        }
      }
    
      @GwtIncompatible // #trueLog2, Math.ulp
      public void testLog2Accuracy() {
        for (double d : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          double dmLog2 = DoubleMath.log2(d);
          double trueLog2 = trueLog2(d);
          assertTrue(Math.abs(dmLog2 - trueLog2) <= Math.ulp(trueLog2));
        }
    Java
    - Registered: 2024-05-03 12:43
    - Last Modified: 2024-02-07 17:50
    - 28.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/DoubleMathTest.java

                  && StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          assertEquals(expected, DoubleMath.isPowerOfTwo(x));
        }
      }
    
      @GwtIncompatible // #trueLog2, Math.ulp
      public void testLog2Accuracy() {
        for (double d : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          double dmLog2 = DoubleMath.log2(d);
          double trueLog2 = trueLog2(d);
          assertTrue(Math.abs(dmLog2 - trueLog2) <= Math.ulp(trueLog2));
        }
    Java
    - Registered: 2024-04-12 12:43
    - Last Modified: 2024-02-07 17:50
    - 28.1K bytes
    - Viewed (0)
Back to top