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

Random#nextGaussian() returns over 1.0 and -1.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.2
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      FULL PRODUCT VERSION :
      java version "1.4.2_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
      Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      --code
      Random random = new Random();
      for(int i=0; i<10; i++){
        System.out.println(random.nextGaussian());
      }

      -- result
      2.0558536576862134
      -1.147759816304306
      -1.2248358586756953
      -1.208248806796028
      -1.150620999880685
      -0.22059212175440984
      0.7492431567166902
      -0.5456290190050589
      -0.8066765958876054
      -1.4302719228423777


      REPRODUCIBILITY :
      This bug can be reproduced always.
      ###@###.### 10/4/04 09:07 GMT

        Attachments

          Activity

            People

            Assignee:
            darcy Joe Darcy
            Reporter:
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: