2#define _USE_MATH_DEFINES
20 double x1, x2, w, y1, y2;
24 w = x1 * x1 + x2 * x2;
27 w =
sqrt(-2.0 * log(w) / w);
37 double r =
sqrt(-2.0 * log(r1));
38 double fi = 2.0 * M_PI * r2;
44 float r =
sqrt(-2.0 * log(r1));
45 float fi = 2.0 * M_PI * r2;
DoubleAc cos(const DoubleAc &f)
DoubleAc sqrt(const DoubleAc &f)
DoubleAc sin(const DoubleAc &f)
void rnorm_double(double r1, double r2, double &x1, double &x2)
void rnorm_float(float r1, float r2, float &x1, float &x2)
double rnorm_improved(void)