go/src/math/rand/v2/rand_test.go

const numTestSamples

var (
	rn
	kn
	wn
	fn
)

var (
	re
	ke
	we
	fe
)

type statsResults

func nearEqual(a, b, closeEnough, maxError float64) bool {}

var testSeeds

// checkSimilarDistribution returns success if the mean and stddev of the
// two statsResults are similar.
func (sr *statsResults) checkSimilarDistribution(expected *statsResults) error {}

func getStatsResults(samples []float64) *statsResults {}

func checkSampleDistribution(t *testing.T, samples []float64, expected *statsResults) {}

func checkSampleSliceDistributions(t *testing.T, samples []float64, nslices int, expected *statsResults) {}

func generateNormalSamples(nsamples int, mean, stddev float64, seed uint64) []float64 {}

func testNormalDistribution(t *testing.T, nsamples int, mean, stddev float64, seed uint64) {}

func TestStandardNormalValues(t *testing.T) {}

func TestNonStandardNormalValues(t *testing.T) {}

func generateExponentialSamples(nsamples int, rate float64, seed uint64) []float64 {}

func testExponentialDistribution(t *testing.T, nsamples int, rate float64, seed uint64) {}

func TestStandardExponentialValues(t *testing.T) {}

func TestNonStandardExponentialValues(t *testing.T) {}

func initNorm() (testKn []uint32, testWn, testFn []float32) {}

func initExp() (testKe []uint32, testWe, testFe []float32) {}

// compareUint32Slices returns the first index where the two slices
// disagree, or <0 if the lengths are the same and all elements
// are identical.
func compareUint32Slices(s1, s2 []uint32) int {}

// compareFloat32Slices returns the first index where the two slices
// disagree, or <0 if the lengths are the same and all elements
// are identical.
func compareFloat32Slices(s1, s2 []float32) int {}

func TestNormTables(t *testing.T) {}

func TestExpTables(t *testing.T) {}

func hasSlowFloatingPoint() bool {}

func TestFloat32(t *testing.T) {}

func TestShuffleSmall(t *testing.T) {}

// encodePerm converts from a permuted slice of length n, such as Perm generates, to an int in [0, n!).
// See https://en.wikipedia.org/wiki/Lehmer_code.
// encodePerm modifies the input slice.
func encodePerm(s []int) int {}

// TestUniformFactorial tests several ways of generating a uniform value in [0, n!).
func TestUniformFactorial(t *testing.T) {}

var Sink

func testRand() *Rand {}

func BenchmarkSourceUint64(b *testing.B) {}

func BenchmarkGlobalInt64(b *testing.B) {}

func BenchmarkGlobalInt64Parallel(b *testing.B) {}

func BenchmarkGlobalUint64(b *testing.B) {}

func BenchmarkGlobalUint64Parallel(b *testing.B) {}

func BenchmarkInt64(b *testing.B) {}

var AlwaysFalse

func keep[T int | uint | int32 | uint32 | int64 | uint64](x T) T {}

func BenchmarkUint64(b *testing.B) {}

func BenchmarkGlobalIntN1000(b *testing.B) {}

func BenchmarkIntN1000(b *testing.B) {}

func BenchmarkInt64N1000(b *testing.B) {}

func BenchmarkInt64N1e8(b *testing.B) {}

func BenchmarkInt64N1e9(b *testing.B) {}

func BenchmarkInt64N2e9(b *testing.B) {}

func BenchmarkInt64N1e18(b *testing.B) {}

func BenchmarkInt64N2e18(b *testing.B) {}

func BenchmarkInt64N4e18(b *testing.B) {}

func BenchmarkInt32N1000(b *testing.B) {}

func BenchmarkInt32N1e8(b *testing.B) {}

func BenchmarkInt32N1e9(b *testing.B) {}

func BenchmarkInt32N2e9(b *testing.B) {}

func BenchmarkFloat32(b *testing.B) {}

func BenchmarkFloat64(b *testing.B) {}

func BenchmarkExpFloat64(b *testing.B) {}

func BenchmarkNormFloat64(b *testing.B) {}

func BenchmarkPerm3(b *testing.B) {}

func BenchmarkPerm30(b *testing.B) {}

func BenchmarkPerm30ViaShuffle(b *testing.B) {}

// BenchmarkShuffleOverhead uses a minimal swap function
// to measure just the shuffling overhead.
func BenchmarkShuffleOverhead(b *testing.B) {}

func BenchmarkConcurrent(b *testing.B) {}

func TestN(t *testing.T) {}