Box-Muller transformation based NRNG - 2024.2 English - XD160

Vitis Libraries

Document ID
XD160
Release Date
2024-11-29
Version
2024.2 English

Box-Muller transformation takes two uniformed distributed random numbers to generate two normal-distributed random number. Although it is an efficient method, it could not hold certain algebra characteristics of input uniformed distributed random number serials, especially when we need NRNG in low-discrepancy serials. It is not the first choice of NRNG in the current stage.

\[Z_0 = \sqrt[2]{-2\ln{U_1}}\cos{2\pi U_2}\]
\[Z_1 = \sqrt[2]{-2\ln{U_1}}\sin{2\pi U_2}\]

To get a smooth output, Box-Muller implementation takes one uniformed random number at each call of next(), outputs one normal distributed random number which is already generated and cached. When two inputs have been cached, it performs Box-Muller transformation above and generates the next two normal-distributed random numbers.

Smooth input and ouput