- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for Log2 (1.61 sec)
-
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} } // Relies on the correctness of log2(BigInteger, {HALF_UP,HALF_DOWN}). public void testLog2HalfEven() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { int halfEven = BigIntegerMath.log2(x, HALF_EVEN); // Now figure out what rounding mode we should behave like (it depends if FLOOR was // odd/even). boolean floorWasEven = (BigIntegerMath.log2(x, FLOOR) & 1) == 0;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 17 17:58:33 UTC 2024 - 27.8K bytes - Viewed (0) -
src/image/gif/writer.go
"image/draw" "internal/byteorder" "io" ) // Graphic control extension fields. const ( gcLabel = 0xF9 gcBlockSize = 0x04 ) var log2Lookup = [8]int{2, 4, 8, 16, 32, 64, 128, 256} func log2(x int) int { for i, v := range log2Lookup { if x <= v { return i } } return -1 } // writer is a buffered writer. type writer interface { Flush() error io.Writer io.ByteWriter }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:38:09 UTC 2024 - 11.9K bytes - Viewed (0) -
src/internal/trace/summary_test.go
// which makes regenerating this test very annoying, since it will // likely break this test. Resolve this by making the order not matter. {Task: 12, Category: "log2", Message: "do"}, {Task: 12, Category: "log", Message: "fanout region4"}, {Task: 12, Category: "log", Message: "fanout region0"}, {Task: 12, Category: "log", Message: "fanout region1"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 13.4K bytes - Viewed (0) -
src/runtime/stack.go
stackLarge.free[i].init() lockInit(&stackLarge.lock, lockRankStackLarge) } } // stacklog2 returns ⌊log_2(n)⌋. func stacklog2(n uintptr) int { log2 := 0 for n > 1 { n >>= 1 log2++ } return log2 } // Allocates a stack from the free pool. Must be called with // stackpool[order].item.mu held. func stackpoolalloc(order uint8) gclinkptr {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:31:00 UTC 2024 - 41.1K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
return x, nil } // SetOverflowingBytes assigns x = b, where b is a slice of big-endian bytes. // SetOverflowingBytes returns an error if b has a longer bit length than m, but // reduces overflowing values up to 2^⌈log2(m)⌉ - 1. // // The output will be resized to the size of m and overwritten. func (x *Nat) SetOverflowingBytes(b []byte, m *Modulus) (*Nat, error) { if err := x.setBytes(b, m); err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/graph/graph.go
} } if total != 0 { for _, e := range edges { frac := float64(abs64(e.Weight)) / float64(total) score += -frac * math.Log2(frac) } if self > 0 { frac := float64(abs64(self)) / float64(total) score += -frac * math.Log2(frac) } } return score } // NodeOrder sets the ordering for a Sort operation type NodeOrder int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 31K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
// SEC 1, Section 4.1.3, point 5 and Section 4.1.4, point 3. func hashToNat[Point nistPoint[Point]](c *nistCurve[Point], e *bigmod.Nat, hash []byte) { // ECDSA asks us to take the left-most log2(N) bits of hash, and use them as // an integer modulo N. This is the absolute worst of all worlds: we still // have to reduce, because the result might still overflow N, but to take
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
// // If α < 1/2 (which can happen for nprimes > 2), we need to // shift todo to compensate for lost bits: the mean value of 0.11... // is 7/8, so todo + shift - nprimes * log2(7/8) ~= bits - 1/2 // will give good results. if nprimes >= 7 { todo += (nprimes - 2) / 5 } for i := 0; i < nprimes; i++ { var err error primes[i], err = rand.Prime(random, todo/(nprimes-i))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableSet.java
* if fewer consecutive positions are filled; see that method for details.) */ static int maxRunBeforeFallback(int tableSize) { return MAX_RUN_MULTIPLIER * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); } } /** * SetBuilderImpl version that uses a JDK HashSet, which has built in hash flooding protection. */
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 08 03:01:02 UTC 2024 - 35.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h
int num_bits = qtype.getStorageTypeIntegralWidth(); if (num_bits == 8) { // If storage is 8-bit, trained num bits may be less than 8 so check here. num_bits = static_cast<int>(std::ceil(std::log2(qtype.getStorageTypeMax()))); } // This is a positive value, and will be applied on zero points and fixed // point ranges. int64_t offset =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 41.7K bytes - Viewed (0)