Exemple #1
0
// Gaussian returns a Gaussian random variate, with mean zero and
// standard deviation sigma.
func Gaussian(rng RngState, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian(rng.state, C.double(sigma)))
}
Exemple #2
0
func Gaussian(r *rng.GslRng, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(sigma)))
}
Exemple #3
0
func GaussianRandomFloat64(rd *RNG, sigma float64) float64 {
	var x float64
	x = float64(C.gsl_ran_gaussian(rd.g, C.double(sigma)))
	return x
}