Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for saturatedPow (0.08 sec)

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

      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
                a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b));
          }
        }
      }
    
      private static final BigInteger MAX_INT = BigInteger.valueOf(Integer.MAX_VALUE);
      private static final BigInteger MIN_INT = BigInteger.valueOf(Integer.MIN_VALUE);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/IntMathTest.java

      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
                a, b, "s^", saturatedCast(valueOf(a).pow(b)), IntMath.saturatedPow(a, b));
          }
        }
      }
    
      private static final BigInteger MAX_INT = BigInteger.valueOf(Integer.MAX_VALUE);
      private static final BigInteger MIN_INT = BigInteger.valueOf(Integer.MIN_VALUE);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/LongMathTest.java

      public void testSaturatedPow() {
        for (long a : ALL_LONG_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
                a, b, "s^", saturatedCast(valueOf(a).pow(b)), LongMath.saturatedPow(a, b));
          }
        }
      }
    
      private void assertOperationEquals(long a, long b, String op, long expected, long actual) {
        if (expected != actual) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @SuppressWarnings("ShortCircuitBoolean")
      public static long saturatedPow(long b, int k) {
        checkNonNegative("exponent", k);
        if (b >= -2 & b <= 2) {
          switch ((int) b) {
            case 0:
              return (k == 0) ? 1 : 0;
            case 1:
              return 1;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @SuppressWarnings("ShortCircuitBoolean")
      public static long saturatedPow(long b, int k) {
        checkNonNegative("exponent", k);
        if (b >= -2 & b <= 2) {
          switch ((int) b) {
            case 0:
              return (k == 0) ? 1 : 0;
            case 1:
              return 1;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top