Abstract This paper introduces the versatile double-sided rejection method for simulating one-dimensional random variables. Effective for variables with continuous monotone densities over bounded intervals, the method uses piecewise constant majorants and minorants. The new technique for probability equalization is developed, involving constraction of special non-uniform meshes. The custom-built computer system PrEMA (Probability Equalization Modelling Algorithms) – available at https://prema.andronix1.ru – is presented. PrEMA includes the “distributed-random” library with C and Rust code implementations of the method. It also features a dialog system for comparing the costs of the double-sided algorithm to the inverse distribution function method and the modified ziggurat algorithm. The impact of different standard pseudo-random number generators on the system’s performance is examined.
Bryzgalov et al. (2026) studied this question.