File Download
There are no files associated with this item.
Supplementary
-
Citations:
- Scopus: 0
- Appears in Collections:
Article: The ziggurat method for generating random variables
Title | The ziggurat method for generating random variables |
---|---|
Authors | |
Issue Date | 2000 |
Publisher | University of California at Los Angeles, Department of Statistics. The Journal's web site is located at http://www.jstatsoft.org/ |
Citation | Journal Of Statistical Software, 2000, v. 5, p. 1-7 How to Cite? |
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 ki and reals wi. 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 < ki return x = j x wi. We illustrate with C code that provides for inline generation of both normal and exponential variables, with a short procedure for setting up the necessary tables. |
Persistent Identifier | http://hdl.handle.net/10722/88916 |
ISSN | 2023 Impact Factor: 5.4 2023 SCImago Journal Rankings: 2.709 |
References |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Marsaglia, G | en_HK |
dc.contributor.author | Tsang, WW | en_HK |
dc.date.accessioned | 2010-09-06T09:50:05Z | - |
dc.date.available | 2010-09-06T09:50:05Z | - |
dc.date.issued | 2000 | en_HK |
dc.identifier.citation | Journal Of Statistical Software, 2000, v. 5, p. 1-7 | en_HK |
dc.identifier.issn | 1548-7660 | en_HK |
dc.identifier.uri | http://hdl.handle.net/10722/88916 | - |
dc.description.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 ki and reals wi. 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 < ki return x = j x wi. We illustrate with C code that provides for inline generation of both normal and exponential variables, with a short procedure for setting up the necessary tables. | en_HK |
dc.language | eng | en_HK |
dc.publisher | University of California at Los Angeles, Department of Statistics. The Journal's web site is located at http://www.jstatsoft.org/ | en_HK |
dc.relation.ispartof | Journal of Statistical Software | en_HK |
dc.title | The ziggurat method for generating random variables | en_HK |
dc.type | Article | en_HK |
dc.identifier.email | Tsang, WW:tsang@cs.hku.hk | en_HK |
dc.identifier.authority | Tsang, WW=rp00179 | en_HK |
dc.description.nature | link_to_subscribed_fulltext | - |
dc.identifier.scopus | eid_2-s2.0-0040833010 | en_HK |
dc.identifier.hkuros | 67135 | en_HK |
dc.relation.references | http://www.scopus.com/mlt/select.url?eid=2-s2.0-0040833010&selection=ref&src=s&origin=recordpage | en_HK |
dc.identifier.volume | 5 | en_HK |
dc.identifier.spage | 1 | en_HK |
dc.identifier.epage | 7 | en_HK |
dc.identifier.scopusauthorid | Marsaglia, G=6603739473 | en_HK |
dc.identifier.scopusauthorid | Tsang, WW=7201558521 | en_HK |
dc.identifier.issnl | 1548-7660 | - |