Skip to content
Prev 3329 / 63424 Next

reproducing Box-Muller numbers

There seems to be a minor problem with reproducing numbers from rnorm with
Box-Muller. The pattern suggests it might have something to do with the value
that gets dropped when an odd number of numbers is requested. (Details below.)

Also, could "user-supplied" be added as an option for normal.kind in RNGkind.
I'm sure the Box-Muller in R is better than my own attempt, but I would like to
be able to reproduce results I've obtained in the past.

Paul Gilbert
________
[1] -1.9242522 -0.8956891  2.1221336  0.8166920 -0.1356919
[1] -0.4602838 -1.9242522 -0.8956891  2.1221336  0.8166920
[1] -1.9242522 -0.8956891  2.1221336  0.8166920 -0.1356919
[1] -0.4602838 -1.9242522 -0.8956891  2.1221336  0.8166920


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._