Regarding Seraj's solution, i believe the solution would be

$ \sqrt(A) cos(2pi*drand48()) $

where A is still the exponential RV calculated in 1b.


- Yes you are correct, I forgot the 2pi factor to change the range of the uniform random variable from [0-1] to [1-2pi].

thank you for pointing it out.

Seraj

Alumni Liaison

Ph.D. on Applied Mathematics in Aug 2007. Involved on applications of image super-resolution to electron microscopy

Francisco Blanco-Silva