Skip to main content
Log in

How to avoid logarithms in comparisons with uniform random variables

Wie man beim Vergleich mit gleichverteilten Zufallszahlen Logarithmen vermeiden kann

  • Short Communications
  • Published:
Computing Aims and scope Submit manuscript

Abstract

In many algorithms for sampling from non-uniform distributions the logarithm of a uniform deviate must be compared with some test quantity. It is shown that all these comparisons can be done efficiently without calling a logarithm subprogram: two procedures for this task are presented and compared.

Zusammenfassung

Bei der Erzeugung nicht-gleichverteilter Zufallszahlen muß häufig der Logarithmus einer gleichverteilten Zufallszahl mit einer Testgröße verglichen werden. Es wird gezeigt, daß dieser Vergleich ohne den Aufruf einer Logarithmusroutine effizient durchführbar ist; zwei Prozeduren für diese Aufgabe werden vorgestellt und verglichen.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

References

  1. Devroye, L.: Non-Uniform Random Variate Generation. New York: Springer-Verlag 1986.

    Google Scholar 

  2. Kinderman, A. J., Monahan, J. F.: Computer generation of random variables using the ratio of uniform deviates. ACM Trans. Math. Software3, 257–260 (1977).

    Google Scholar 

  3. Knuth, D. E.: The Art of Computer Programming, Vol. I: Fundamental Algorithms. 2nd Ed. Reading, Mass.: Addison-Wesley 1973.

    Google Scholar 

  4. Knuth, D. E.: The Art of Computer Programming, Vol. II: Seminumerical Algorithms. 2nd Ed. Reading, Mass.: Addison-Wesley 1981.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ahrens, J.H. How to avoid logarithms in comparisons with uniform random variables. Computing 41, 163–166 (1989). https://doi.org/10.1007/BF02238740

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02238740

AMS (MOS) Subject Classification

Key words

Navigation