go/src/math/rand/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 int64) []float64 {}

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

func TestStandardNormalValues(t *testing.T) {}

func TestNonStandardNormalValues(t *testing.T) {}

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

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

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 testReadUniformity(t *testing.T, n int, seed int64) {}

func TestReadUniformity(t *testing.T) {}

func TestReadEmpty(t *testing.T) {}

func TestReadByOneByte(t *testing.T) {}

func TestReadSeedReset(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) {}

func TestSeedNop(t *testing.T) {}

func BenchmarkInt63Threadsafe(b *testing.B) {}

func BenchmarkInt63ThreadsafeParallel(b *testing.B) {}

func BenchmarkInt63Unthreadsafe(b *testing.B) {}

func BenchmarkIntn1000(b *testing.B) {}

func BenchmarkInt63n1000(b *testing.B) {}

func BenchmarkInt31n1000(b *testing.B) {}

func BenchmarkFloat32(b *testing.B) {}

func BenchmarkFloat64(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 BenchmarkRead3(b *testing.B) {}

func BenchmarkRead64(b *testing.B) {}

func BenchmarkRead1000(b *testing.B) {}

func BenchmarkConcurrent(b *testing.B) {}