2#define _USE_MATH_DEFINES
14void rnorm_double(
const double r1,
const double r2,
double &x1,
double &x2) {
15 const double r =
sqrt(-2.0 * log(r1));
16 const double fi = 2.0 * M_PI * r2;
21void rnorm_float(
const float r1,
const float r2,
float &x1,
float &x2) {
22 const float r =
sqrt(-2.0 * log(r1));
23 const float fi = 2.0 * M_PI * r2;
DoubleAc cos(const DoubleAc &f)
void rnorm_double(const double r1, const double r2, double &x1, double &x2)
DoubleAc sin(const DoubleAc &f)
DoubleAc sqrt(const DoubleAc &f)
void rnorm_float(const float r1, const float r2, float &x1, float &x2)