Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for exponent (0.2 sec)

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

        for (int i = 1; i <= 40; i++) {
          intValues.add(i);
        }
        // Now add values near 2^N for lots of values of N.
        for (int exponent : asList(2, 3, 4, 9, 15, 16, 17, 24, 25, 30)) {
          int x = 1 << exponent;
          intValues.add(x, x + 1, x - 1);
        }
        intValues.add(9999).add(10000).add(10001).add(1000000); // near powers of 10
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/MathTesting.java

        for (int i = 1; i <= 40; i++) {
          intValues.add(i);
        }
        // Now add values near 2^N for lots of values of N.
        for (int exponent : asList(2, 3, 4, 9, 15, 16, 17, 24, 25, 30)) {
          int x = 1 << exponent;
          intValues.add(x, x + 1, x - 1);
        }
        intValues.add(9999).add(10000).add(10001).add(1000000); // near powers of 10
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/DoubleMath.java

            // so log2(x) is never exactly exponent + 0.5.
            increment = (xScaled * xScaled) > 2.0;
            break;
          default:
            throw new AssertionError();
        }
        return increment ? exponent + 1 : exponent;
      }
    
      private static final double LN_2 = log(2);
    
      /**
       * Returns {@code true} if {@code x} represents a mathematical integer.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/BigDecimalMathTest.java

            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      public void testRoundToDouble_wayTooBig() {
        BigDecimal bi = BigDecimal.valueOf(2).pow(2 * Double.MAX_EXPONENT);
        new RoundToDoubleTester(bi)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
            .setExpectation(Double.POSITIVE_INFINITY, UP, CEILING)
            .roundUnnecessaryShouldThrow()
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java

            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      public void testRoundToDouble_wayTooBig() {
        BigDecimal bi = BigDecimal.valueOf(2).pow(2 * Double.MAX_EXPONENT);
        new RoundToDoubleTester(bi)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
            .setExpectation(Double.POSITIVE_INFINITY, UP, CEILING)
            .roundUnnecessaryShouldThrow()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  6. fastapi/encoders.py

    
    # Taken from Pydantic v1 as is
    # TODO: pv2 should this return strings instead?
    def decimal_encoder(dec_value: Decimal) -> Union[int, float]:
        """
        Encodes a Decimal as int of there's no exponent, otherwise float
    
        This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
        where a integer (but not int typed) is used. Encoding this as a float
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/IntMath.java

       *
       * @throws IllegalArgumentException if {@code k < 0}
       */
      @GwtIncompatible // failing tests
      public static int pow(int b, int k) {
        checkNonNegative("exponent", k);
        switch (b) {
          case 0:
            return (k == 0) ? 1 : 0;
          case 1:
            return 1;
          case (-1):
            return ((k & 1) == 0) ? 1 : -1;
          case 2:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_wayTooBig() {
        BigInteger bi = BigInteger.ONE.shiftLeft(2 * Double.MAX_EXPONENT);
        new RoundToDoubleTester(bi)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
            .setExpectation(Double.POSITIVE_INFINITY, UP, CEILING)
            .roundUnnecessaryShouldThrow()
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            .roundUnnecessaryShouldThrow()
            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_wayTooBig() {
        BigInteger bi = BigInteger.ONE.shiftLeft(2 * Double.MAX_EXPONENT);
        new RoundToDoubleTester(bi)
            .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN)
            .setExpectation(Double.POSITIVE_INFINITY, UP, CEILING)
            .roundUnnecessaryShouldThrow()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/primitives/FloatsTest.java

                for (String expMarker : ImmutableList.of("p", "P")) {
                  for (String exponent : ImmutableList.of("0", "-5", "+20", "52")) {
                    for (String typePart : ImmutableList.of("", "D", "F", "d", "f")) {
                      checkTryParse(
                          signChar + hexPrefix + iPart + fPart + expMarker + exponent + typePart);
                    }
                  }
                }
              }
            }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 29.5K bytes
    - Viewed (0)
Back to top