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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: siad dot ardroumli at gmail dot com
New email:
PHP Version: OS:

 

 [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: Sun Aug 18 19:01:27 2019 UTC