[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    Re: RFR: JDK-8273056 java.util.random does not correctly sample exponential or Gaussian distribution
From:       Joe Darcy <darcy () openjdk ! java ! net>
Date:       2021-11-30 22:28:20
Message-ID: v2GiIjIld5UXlDgj1jFF-9h8Sis_MM_mk6MioBOJsAw=.bd94c270-9218-4280-bcbc-eeb54a2b3451 () github ! com
[Download RAW message or body]

On Thu, 11 Nov 2021 13:59:51 GMT, Jim Laskey <jlaskey@openjdk.org> wrote:

> The modified ziggurat algorithm is not correctly implemented in \
> `java.base/jdk/internal/util/random/RandomSupport.java`.  
> Create a histogram of a million samples using 2000 uniform bins with the following \
> range:  Exponential range from 0 to 12. Gaussian range from -8 to 8. 
> 
> This does not pass a Chi-square test. If you look at the histogram it is obviously \
> not showing the shape of the PDF for these distributions. Look closely at the range \
> around zero (e.g. +/- 0.5).

Should there be a regression test here?

-------------

PR: https://git.openjdk.java.net/jdk/pull/6353


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic