mardi 1 octobre 2019

Does boost:: or std::normal_distribution use inverse cumulative distribution function?

The specification for my project asks to produce normally distribute random numbers, and it specifically requires that I use inverse cumulative distribution function to convert uniformly distributed numbers to the standard normal ones.

The reason for this requirement: an older "polar" method exists, where a pair of uniformly distributed random numbers is converted to a pair of normally distributed numbers, which also involves throwing away the original numbers in some cases. This older method is known to produce imperfect distribution tails.

I want to use either std::normal_distribution or boost::normal_distribution, combined with corresponding random number engine. Is there a guarantee in C++ standard that precludes using polar method? If not, I'd like to know for sure that Visual C++ 14 or boost uses the modern method (inverse cumulative normal distribution).




Aucun commentaire:

Enregistrer un commentaire