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

Random#nextGaussian() returns over 1.0 and -1.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 1.4.2
    • 1.4.2
    • core-libs
    • x86
    • windows_2000

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: