Probably not a great decision at the time, but uniform distribution over the interval requires passing Uniform => 1 to integer(), makerandom() etc. In 1.52, I allow Uniform => 1 to be passed to the constructor and also introduced a chi-square test to test a generated distribution.
I am going to further test dependent modules and see if I can safely make Uniform => 1 the default.
On Sat Dec 22 11:28:11 2018, VIPUL wrote:
Show quoted text> Looks worrisome. I'll dig into it.
>
> On Sun Oct 01 00:10:48 2017, KENTNL wrote:
> > replaced the == test with
> >
> > warn("$x == $y Strength=$$gen{Strength} Provider=$$gen{Provider}") if
> > $x == $y;
> >
> > And ran 10,000 times. ( == 30,000 invocations of test() )
> >
> > 67/30000 = 0.22%
> >
> > 19 were from devurandom ( 0.19% )
> > 24 were from devrandom ( 0.24% )
> > 24 were from rand ( 0.24% )
> >
> > However, the *distribution* of where these pairs occured were a bit
> > disturbing:
> > 100% of them occurred above 512
> >
> > Which suggests there's a whole bit of data lost somewhere, or some
> > kind of leak
> > in the random.
> >
> > Image of distribution, and the data of sequential collisions attached.
> >
> > This seems potentially far more serious than a bad test.
> >
> > --
> > - CPAN kentnl@cpan.org
> > - Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
>