Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 24 for exponent (0.04 seconds)

  1. android/guava/src/com/google/common/math/DoubleUtils.java

        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 5.1K bytes
    - Click Count (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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sun Aug 10 19:54:19 GMT 2025
    - 11.3K bytes
    - Click Count (0)
  3. guava/src/com/google/common/math/DoubleUtils.java

        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 5.1K bytes
    - Click Count (0)
  4. fastapi/encoders.py

        >>> decimal_encoder(Decimal("1.0"))
        1.0
    
        >>> decimal_encoder(Decimal("1"))
        1
    
        >>> decimal_encoder(Decimal("NaN"))
        nan
        """
        exponent = dec_value.as_tuple().exponent
        if isinstance(exponent, int) and exponent >= 0:
            return int(dec_value)
        else:
            return float(dec_value)
    
    
    ENCODERS_BY_TYPE: dict[type[Any], Callable[[Any], Any]] = {
        bytes: lambda o: o.decode(),
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 10.7K bytes
    - Click Count (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

        return ******@****.***::getDeclaringClass()();
      }-*/;
    
      static int reduceIterationsIfGwt(int iterations) {
        return iterations / 10;
      }
    
      static int reduceExponentIfGwt(int exponent) {
        return exponent / 2;
      }
    
      private Platform() {}
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Jun 10 15:17:16 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/collect/Platform.java

        return e.getDeclaringClass();
      }
    
      static int reduceIterationsIfGwt(int iterations) {
        return iterations;
      }
    
      static int reduceExponentIfGwt(int exponent) {
        return exponent;
      }
    
      private Platform() {}
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  7. guava/src/com/google/common/collect/Platform.java

        return e.getDeclaringClass();
      }
    
      static int reduceIterationsIfGwt(int iterations) {
        return iterations;
      }
    
      static int reduceExponentIfGwt(int exponent) {
        return exponent;
      }
    
      private Platform() {}
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  8. internal/config/identity/openid/jwks.go

    func (key *JWKS) DecodePublicKey() (crypto.PublicKey, error) {
    	switch key.Kty {
    	case "RSA":
    		if key.N == "" || key.E == "" {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		// decode exponent
    		ebuf, err := base64.RawURLEncoding.DecodeString(key.E)
    		if err != nil {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		nbuf, err := base64.RawURLEncoding.DecodeString(key.N)
    		if err != nil {
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Apr 02 23:02:35 GMT 2024
    - 3.1K bytes
    - Click Count (0)
  9. internal/s3select/json/record.go

    	// Convert as if by ES6 number to string conversion.
    	// This matches most other JSON generators.
    	// See golang.org/issue/6384 and golang.org/issue/14135.
    	// Like fmt %g, but the exponent cutoffs are different
    	// and exponents themselves are not padded to two digits.
    	abs := math.Abs(f)
    	fmt := byte('f')
    	if abs != 0 {
    		if abs < 1e-6 || abs >= 1e21 {
    			fmt = 'e'
    		}
    	}
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 5.2K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/primitives/DoublesTest.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);
                    }
                  }
                }
              }
            }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 20:45:32 GMT 2025
    - 30.9K bytes
    - Click Count (0)
Back to Top