TL;DR: In this article, a new version of the ziggurat method for generating a random variable from a given decreasing density is presented, which is faster and simpler than the original, and will produce, for example, normal or exponential variates at the rate of 15 million per second with a C version on a 400MHz PC.
Abstract: We provide a new version of our ziggurat method for generating a random variable from a given decreasing density. It is faster and simpler than the original, and will produce, for example, normal or exponential variates at the rate of 15 million per second with a C version on a 400MHz PC. It uses two tables, integers k i , and reals w i . Some 99% of the time, the required x is produced by: Generate a random 32-bit integer j and let i be the index formed from the rightmost 8 bits of j. If j < k, return x = j x w i .
We illustrate with C code that provides for inline generation of both normal and exponential variables, with a short procedure for settting up the necessary tables.
TL;DR: An architecture and implementation of a high performance Gaussian random number generator (GRNG) is described and the resulting system can generate 169 million normally distributed random numbers per second on a Xilinx XC2VP3O-6 device.
Abstract: An architecture and implementation of a high performance Gaussian random number generator (GRNG) is described. The GRNG uses the Ziggurat algorithm which divides the area under the probability density function into three regions (rectangular, wedge and tail). The rejection method is then used and this amounts to determining whether a random point falls into one of the three regions. The vast majority of points lie in the rectangular region and are accepted to directly produce a random variate. For the nonrectangular regions, which occur 1.5% of the time, the exponential or logarithm functions must be computed and an iterative fixed point operation unit is used. Computation of the rectangular region is heavily pipelined and a buffering scheme is used to allow the processing of rectangular regions to continue to operate in parallel with evaluation of the wedge and tail computation. The resulting system can generate 169 million normally distributed random numbers per second on a Xilinx XC2VP3O-6 device.
TL;DR: The Ziggurat algorithm as mentioned in this paper is a different method that allows for a flexible time-memory trade-off, offering developers freedom in choosing how much space they can spare to store precomputed values.
Abstract: Several lattice-based cryptosystems require to sample from a discrete Gaussian distribution over the integers. Existing methods to sample from such a distribution either need large amounts of memory or they are very slow. In this paper we explore a different method that allows for a flexible time-memory trade-off, offering developers freedom in choosing how much space they can spare to store precomputed values. We prove that the generated distribution is close enough to a discrete Gaussian to be used in lattice-based cryptography. Moreover, we report on an implementation of the method and compare its performance to existing methods from the literature. We show that for large standard deviations, the Ziggurat algorithm outperforms all existing methods.
TL;DR: It is shown that the short period of the uniform random number generator in the published implementation of Marsaglia and Tsang's Ziggurat method for generating random deviates can lead to poor distributions.
Abstract: We show that the short period of the uniform random number generator in the published implementation of Marsaglia and Tsang's Ziggurat method for generating random deviates can lead to poor distributions. Changing the uniform random number generator used in its implementation fixes this issue.
TL;DR: Algorithms to generate samples from the normal probability distribution were analyzed in a technology-independent empirical Knuth type A algorithm analysis, finding no conclusion of the best algorithm, but scrutiny of results would lead to selection of thebest algorithm for a specific implementation.
Abstract: Criteria for selection of a \"best\" algorithm change with technology. Algorithms to generate samples from the normal probability distribution were analyzed in a technology-independent empirical Knuth type A algorithm analysis. No conclusion of the best algorithm was reached, but scrutiny of results would lead to selection of the best algorithm for a specific implementation. Further, a known general technique for improving rejection sampling efficiency is applied to sampling from the normal distribution.