Boost Random Numbers: Normal Distribution
Hello, I tried to find out which method is used by the boost library to transform random numbers from a random number engine to the Gaussian Distribution. There are the Box-Muller-Method, Marsaglia's Polar Method and Ziggurat's algorithm out there, but i could not determine which of those is actually used by boost::normal_distribution<double>? I'd like to know which method is employed here. Thanks for reply in advance, sincerely, Lars
On Wed, Jun 10, 2015 at 11:59 AM, Hadidi, Lars < lhadidi@students.uni-mainz.de> wrote:
I'd like to know which method is employed here.
Have you tried reading the implementation ( http://www.boost.org/doc/libs/1_58_0/boost/random/normal_distribution.hpp)? Hint: The first comment after the includes is // tables for the ziggurat algorithm
?Thank you for help.
I did look into the source but the comment on line 245 about Box-Muller confused me.
Just wanted to be sure if it is really Ziggurat now.
________________________________
Von: Boost-users
Recently, it changed to Ziggurat's method. On 2015-06-10 17:59, Hadidi, Lars wrote:
Hello,
I tried to find out which method is used by the boost library to transform random numbers from a random number engine to the Gaussian Distribution.
There are the Box-Muller-Method, Marsaglia's Polar Method and Ziggurat's algorithm out there, but i could not determine which of those is actually used by
boost::normal_distribution<double>
I'd like to know which method is employed here.
Thanks for reply in advance,
sincerely,
Lars
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Hadidi, Lars
-
Oswin Krause
-
Tim Song