About Anaconda Help Download Anaconda

The 'Ziggurat' pseudo-random number generator (or PRNG), introduced by Marsaglia and Tsang (2000, <doi:10.18637/jss.v005.i08>) and further improved by Leong et al (2005, <doi:10.18637/jss.v012.i07>), offers a lightweight and very fast PRNG for the normal, exponential, and uniform distributions. It is provided here in a small zero-dependency package. It can be used from R as well as from 'C/C++' code in other packages as is demonstrated by four included sample packages using four distinct methods to use the PRNG presented here in client package. The implementation is influenced by our package 'RcppZiggurat' which offers a comparison among multiple alternative implementations but presented here in a lighter-weight implementation that is easier to use by other packages. The PRNGs provided are generally faster than the ones in base R: on our machine, the relative gains for normal, exponential and uniform are on the order of 7.4, 5.2 and 4.7 times faster than base R. However, these generators are of potentially lesser quality and shorter period so if in doubt use of the base R functions remains the general recommendation.

copied from cf-post-staging / r-zigg

Installers

  • linux-64 v0.0.2
  • osx-64 v0.0.2
  • win-64 v0.0.2
  • linux-ppc64le v0.0.2
  • linux-aarch64 v0.0.2
  • osx-arm64 v0.0.2

conda install

To install this package run one of the following:
conda install conda-forge::r-zigg

Description


© 2025 Anaconda, Inc. All Rights Reserved. (v4.2.2) Legal | Privacy Policy