Generate two uniformly distributed random numbers in

the interval [0, 1], say u and v; then

x1= sqrt(-2*ln(u))*cos(2*pi*v)

and

x2= sqrt(-2*ln(u))*sin(2*pi*v)

both are N(0,1). make your choice

Another (worse, but fast) method is:

generate 12 U(0, 1) random numbers; add them and

subtract 6, ie, sum(i= 1, 12)(x[i]])-6; don't expect much

accuracy near the extremes of the N(0,1) function value

kind regards,

Jos aka jos@and.nl

the interval [0, 1], say u and v; then

x1= sqrt(-2*ln(u))*cos(2*pi*v)

and

x2= sqrt(-2*ln(u))*sin(2*pi*v)

both are N(0,1). make your choice

Another (worse, but fast) method is:

generate 12 U(0, 1) random numbers; add them and

subtract 6, ie, sum(i= 1, 12)(x[i]])-6; don't expect much

accuracy near the extremes of the N(0,1) function value

kind regards,

Jos aka jos@and.nl