21 #ifndef BZ_RANDOM_NORMAL
22 #define BZ_RANDOM_NORMAL
24 #ifndef BZ_RANDOM_UNIFORM
30 template<typename T =
double, typename IRNG =
defaultIRNG,
39 const T
s = 0.449871,
t = -0.386595,
a = 0.19600, b = 0.25472;
40 const T r1 = 0.27597, r2 = 0.27846;
51 u = this->getUniform();
52 v = 1.715527769921413592960379282557544956242L
53 * (this->getUniform() - 0.5);
58 T
q = x*x + y*(
a*y - b*x);
69 if (v*v <= -4.0 * log(u)*u*u)
79 template<
typename T = double,
typename IRNG =
defaultIRNG,
105 #endif // BZ_RANDOM_NORMAL