attribution for gaussian random number algorithm
This commit is contained in:
@@ -27,6 +27,7 @@ double normalcdf(double z)
|
|||||||
|
|
||||||
double gaussrand()
|
double gaussrand()
|
||||||
{
|
{
|
||||||
|
/* Marsaglia and Bray, ``A Convenient Method for Generating Normal Variables'' */
|
||||||
static double V1, V2, S;
|
static double V1, V2, S;
|
||||||
static int phase = 0;
|
static int phase = 0;
|
||||||
double X;
|
double X;
|
||||||
|
|||||||
Reference in New Issue
Block a user