Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,219 for int63 (3.03 sec)

  1. src/math/rand/regress_test.go

    	int64(1543572285742637646),          // Int63()
    	int64(2661732831099943416),          // Int63()
    	int64(8325060299420976708),          // Int63()
    	int64(7837839688282259259),          // Int63()
    	int64(2518412263346885298),          // Int63()
    	int64(5617773211005988520),          // Int63()
    	int64(2339563716805116249),          // Int63()
    	int64(7144924247938981575),          // Int63()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 17.8K bytes
    - Viewed (0)
  2. src/math/rand/rand.go

    	u := uint(r.Int63())
    	return int(u << 1 >> 1) // clear sign bit if int == int32
    }
    
    // Int63n returns, as an int64, a non-negative pseudo-random number in the half-open interval [0,n).
    // It panics if n <= 0.
    func (r *Rand) Int63n(n int64) int64 {
    	if n <= 0 {
    		panic("invalid argument to Int63n")
    	}
    	if n&(n-1) == 0 { // n is power of two, can mask
    		return r.Int63() & (n - 1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/rand/rand.go

    	return rng.rand.Intn(max-min) + min
    }
    
    // IntnRange generates an int64 integer in range [min,max).
    // By design this should panic if input is invalid, <= 0.
    func Int63nRange(min, max int64) int64 {
    	rng.Lock()
    	defer rng.Unlock()
    	return rng.rand.Int63n(max-min) + min
    }
    
    // Seed seeds the rng with the provided seed.
    func Seed(seed int64) {
    	rng.Lock()
    	defer rng.Unlock()
    
    	rng.rand = rand.New(rand.NewSource(seed))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 11 11:02:01 UTC 2018
    - 3.5K bytes
    - Viewed (0)
  4. src/math/rand/example_test.go

    	// Int31, Int63, and Uint32 generate values of the given width.
    	// The Int method (not shown) is like either Int31 or Int63
    	// depending on the size of 'int'.
    	show("Int31", r.Int31(), r.Int31(), r.Int31())
    	show("Int63", r.Int63(), r.Int63(), r.Int63())
    	show("Uint32", r.Uint32(), r.Uint32(), r.Uint32())
    
    	// Intn, Int31n, and Int63n limit their output to be < n.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 16:24:57 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  5. internal/dsync/locked_rand.go

    	lk  sync.Mutex
    	src rand.Source
    }
    
    // Int63 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *lockedRandSource) Int63() (n int64) {
    	r.lk.Lock()
    	n = r.src.Int63()
    	r.lk.Unlock()
    	return
    }
    
    // Seed uses the provided seed value to initialize the generator to a
    // deterministic state.
    func (r *lockedRandSource) Seed(seed int64) {
    	r.lk.Lock()
    	r.src.Seed(seed)
    	r.lk.Unlock()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:39:59 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  6. src/math/rand/auto_test.go

    	// order in the deterministic Seed(1) result.
    	var out []int64
    	for i := 0; i < 10; i++ {
    		out = append(out, Int63())
    	}
    
    	// Look for out in Seed(1)'s output.
    	// Strictly speaking, we should look for them in order,
    	// but this is good enough and not significantly more
    	// likely to have a false positive.
    	Seed(1)
    	found := 0
    	for i := 0; i < 1000; i++ {
    		x := Int63()
    		if x == out[found] {
    			found++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 16:49:48 UTC 2022
    - 1K bytes
    - Viewed (0)
  7. src/math/rand/rng.go

    			u ^= rngCooked[i]
    			rng.vec[i] = u
    		}
    	}
    }
    
    // Int63 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (rng *rngSource) Int63() int64 {
    	return int64(rng.Uint64() & rngMask)
    }
    
    // Uint64 returns a non-negative pseudo-random 64-bit integer as a uint64.
    func (rng *rngSource) Uint64() uint64 {
    	rng.tap--
    	if rng.tap < 0 {
    		rng.tap += rngLen
    	}
    
    	rng.feed--
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 04 14:20:53 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  8. pkg/api/testing/copy_test.go

    	for i := 0; i < *roundtrip.FuzzIters; i++ {
    		for _, version := range []schema.GroupVersion{{Group: "", Version: runtime.APIVersionInternal}, {Group: "", Version: "v1"}} {
    			f := fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(rand.Int63()), legacyscheme.Codecs)
    			for kind := range legacyscheme.Scheme.KnownTypes(version) {
    				doDeepCopyTest(t, version.WithKind(kind), f)
    			}
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:45:31 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  9. src/math/rand/race_test.go

    			for j := 0; j < numCycles; j++ {
    				var seed int64
    				seed += int64(ExpFloat64())
    				seed += int64(Float32())
    				seed += int64(Float64())
    				seed += int64(Intn(Int()))
    				seed += int64(Int31n(Int31()))
    				seed += int64(Int63n(Int63()))
    				seed += int64(NormFloat64())
    				seed += int64(Uint32())
    				seed += int64(Uint64())
    				for _, p := range Perm(10) {
    					seed += int64(p)
    				}
    				Read(buf)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 28 16:06:21 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  10. pkg/proxy/apis/config/fuzzer/fuzzer.go

    			obj.Conntrack.MaxPerCore = ptr.To(c.Int31())
    			obj.Conntrack.Min = ptr.To(c.Int31())
    			obj.Conntrack.TCPCloseWaitTimeout = &metav1.Duration{Duration: time.Duration(c.Int63()) * time.Hour}
    			obj.Conntrack.TCPEstablishedTimeout = &metav1.Duration{Duration: time.Duration(c.Int63()) * time.Hour}
    			obj.FeatureGates = map[string]bool{c.RandString(): true}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:33:53 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top