Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for numerator (0.23 sec)

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

          return builder.buildOrThrow();
        }
    
        private double singleQuantileFromSorted(int index, int scale, double[] dataset) {
          long numerator = (long) index * (dataset.length - 1);
          int positionFloor = (int) LongMath.divide(numerator, scale, RoundingMode.DOWN);
          int remainder = (int) (numerator - positionFloor * scale);
          if (remainder == 0) {
            return dataset[positionFloor];
          } else {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

          return builder.buildOrThrow();
        }
    
        private double singleQuantileFromSorted(int index, int scale, double[] dataset) {
          long numerator = (long) index * (dataset.length - 1);
          int positionFloor = (int) LongMath.divide(numerator, scale, RoundingMode.DOWN);
          int remainder = (int) (numerator - positionFloor * scale);
          if (remainder == 0) {
            return dataset[positionFloor];
          } else {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/LongMath.java

                  // It's definitely safe to multiply into numerator and denominator.
                  numerator *= n;
                  denominator *= i;
                  numeratorBits += nBits;
                } else {
                  // It might not be safe to multiply into numerator and denominator,
                  // so multiply (numerator / denominator) into result.
                  result = multiplyFraction(result, numerator, denominator);
                  numerator = n;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  4. cmd/utils_test.go

    func TestCeilFrac(t *testing.T) {
    	cases := []struct {
    		numerator, denominator, ceiling int64
    	}{
    		{0, 1, 0},
    		{-1, 2, 0},
    		{1, 2, 1},
    		{1, 1, 1},
    		{3, 2, 2},
    		{54, 11, 5},
    		{45, 11, 5},
    		{-4, 3, -1},
    		{4, -3, -1},
    		{-4, -3, 2},
    		{3, 0, 0},
    	}
    	for i, testCase := range cases {
    		ceiling := ceilFrac(testCase.numerator, testCase.denominator)
    		if ceiling != testCase.ceiling {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. cmd/utils.go

    }
    
    // ceilFrac takes a numerator and denominator representing a fraction
    // and returns its ceiling. If denominator is 0, it returns 0 instead
    // of crashing.
    func ceilFrac(numerator, denominator int64) (ceil int64) {
    	if denominator == 0 {
    		// do nothing on invalid input
    		return
    	}
    	// Make denominator positive
    	if denominator < 0 {
    		numerator = -numerator
    		denominator = -denominator
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 31.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/UnsignedInts.java

       * quantities.
       *
       * <p><b>Java 8+ users:</b> use {@link Integer#divideUnsigned(int, int)} instead.
       *
       * @param dividend the dividend (numerator)
       * @param divisor the divisor (denominator)
       * @throws ArithmeticException if divisor is 0
       */
      public static int divide(int dividend, int divisor) {
        return (int) (toLong(dividend) / toLong(divisor));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/Quantiles.java

          // a rounded ratio and a remainder which can be expressed as ints, without risk of overflow:
          int quotient = (int) LongMath.divide(numerator, scale, RoundingMode.DOWN);
          int remainder = (int) (numerator - (long) quotient * scale);
          selectInPlace(quotient, dataset, 0, dataset.length - 1);
          if (remainder == 0) {
            return dataset[quotient];
          } else {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 29.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/UnsignedLongs.java

       * quantities.
       *
       * <p><b>Java 8+ users:</b> use {@link Long#divideUnsigned(long, long)} instead.
       *
       * @param dividend the dividend (numerator)
       * @param divisor the divisor (denominator)
       * @throws ArithmeticException if divisor is 0
       */
      public static long divide(long dividend, long divisor) {
        if (divisor < 0) { // i.e., divisor >= 2^63:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/BigIntegerMath.java

        for (int i = 1; i < k; i++) {
          int p = n - i;
          int q = i + 1;
    
          // log2(p) >= bits - 1, because p >= n/2
    
          if (numeratorBits + bits >= Long.SIZE - 1) {
            // The numerator is as big as it can get without risking overflow.
            // Multiply numeratorAccum / denominatorAccum into accum.
            accum =
                accum
                    .multiply(BigInteger.valueOf(numeratorAccum))
    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)
  10. okhttp-idna-mapping-table/src/main/resources/okhttp3/internal/idna/IdnaMappingTable.txt

    215E          ; mapped                 ; 0037 2044 0038 #1.1  VULGAR FRACTION SEVEN EIGHTHS
    215F          ; mapped                 ; 0031 2044     # 1.1  FRACTION NUMERATOR ONE
    2160          ; mapped                 ; 0069          # 1.1  ROMAN NUMERAL ONE
    2161          ; mapped                 ; 0069 0069     # 1.1  ROMAN NUMERAL TWO
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Feb 10 11:25:47 GMT 2024
    - 854.1K bytes
    - Viewed (2)
Back to top