Box-Muller transformation based NRNG - 2023.2 English

Vitis Libraries

Release Date
2023.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’s 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 smooth output, Box-Muller implementation takes 1 uniformed random number at each call of next(), outputs 1 normal distributed random number which is already generated and cached. When 2 inputs have been cached, it performs Box-Muller transformation above and generates the next two normal-distributed random numbers.

Smooth input and ouput