Ejemplo n.º 1
0
func GaussianRatioMethod(r *rng.GslRng, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian_ratio_method((*C.gsl_rng)(unsafe.Pointer(r.Ptr())), C.double(sigma)))
}
Ejemplo n.º 2
0
// GaussianRatioMethod returns a Gaussian random variate, with mean zero and
// standard deviation sigma computed via the Kinderman-Monahan-Leva ratio
// method.
func GaussianRatioMethod(rng RngState, sigma float64) float64 {
	return float64(C.gsl_ran_gaussian_ratio_method(rng.state, C.double(sigma)))
}