- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for randIntn (0.08 sec)
-
src/net/dnsclient.go
"golang.org/x/net/dns/dnsmessage" ) // provided by runtime // //go:linkname runtime_rand runtime.rand func runtime_rand() uint64 func randInt() int { return int(uint(runtime_rand()) >> 1) // clear sign bit } func randIntn(n int) int { return randInt() % n } // reverseaddr returns the in-addr.arpa. or ip6.arpa. hostname of the IP // address addr suitable for rDNS (PTR) record lookup or an error if it fails
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 5.7K bytes - Viewed (0) -
src/math/big/gcd_test.go
// This file implements a GCD benchmark. // Usage: go test math/big -test.bench GCD package big import ( "math/rand" "testing" ) // randInt returns a pseudo-random Int in the range [1<<(size-1), (1<<size) - 1] func randInt(r *rand.Rand, size uint) *Int { n := new(Int).Lsh(intOne, size-1) x := new(Int).Rand(r, n) return x.Add(x, n) // make sure result > 1<<(size-1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 14 19:11:43 UTC 2016 - 2.2K bytes - Viewed (0)