php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78233 stats_rand_gen_* functions do not generate random values.
Submitted: 2019-06-29 15:01 UTC Modified: 2019-06-29 19:08 UTC
From: siad dot ardroumli at gmail dot com Assigned:
Status: Open Package: stats (PECL)
PHP Version: 7.3.6 OS: Windows 10 Home
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-06-29 15:01 UTC] siad dot ardroumli at gmail dot com
Description:
------------
Using the function stats_rand_gen_normal() produces always the same number.

For example stats_rand_gen_normal(0,1) will always produce 0.87032747268677

php -r "echo stats_rand_gen_normal(0,1);"
0.87032747268677

Test script:
---------------
<?php

echo stats_rand_gen_normal(0,1);
echo PHP_EOL;
echo stats_rand_gen_normal(0,1);
echo PHP_EOL;
echo stats_rand_gen_normal(0,1);


Expected result:
----------------
A random normal number.

Actual result:
--------------
Always the same normal number for the same arguments used.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-29 19:08 UTC] siad dot ardroumli at gmail dot com
-Summary: stats_rand_gen_normal produces no random number +Summary: stats_rand_gen_* functions do not generate random values.
 [2019-06-29 19:08 UTC] siad dot ardroumli at gmail dot com
It seems that all stats_rand_gen_* functions do not generate random values.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Aug 22 12:01:27 2019 UTC