Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164923

Error in the documentation for java.lang.Random

    XMLWordPrintable

Details

    • b152
    • Not verified

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      The documentation for java.lang.Random (https://docs.oracle.com/javase/8/docs/api/java/util/Random.html) incorrectly states that Linear Congruential Pseudorandom number generators are described by Donald Knuth in Volume 3 of "The Art of Computer Programming". This is incorrect: these algorithms are described in Volume 2 (the documentation correctly reports that the subtitle of the book is "Seminumerical Algorithms", but misstates the volume number).

      The book is actually referred to 3 times in the documentation: correctly the first time, incorrectly the next two. Specifically in:

      https://docs.oracle.com/javase/8/docs/api/java/util/Random.html#next(int)
      https://docs.oracle.com/javase/8/docs/api/java/util/Random.html#nextGaussian

      REGRESSION. Last worked in version 8u102

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Online documentation


      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            aroy Abhijit Roy (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: