|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59292 Error in stats package (stats_cdf_t function)
Submitted: 2010-07-03 13:57 UTC Modified: 2016-05-28 05:22 UTC
Avg. Score:4.0 ± 0.9
Reproduced:7 of 7 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (14.3%)
From: mr dot schyte at gmail dot com Assigned: uchiyama (profile)
Status: Closed Package: stats (PECL)
PHP Version: 5.3.2 OS: Linux 2.6.34
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
1 + 12 = ?
Subscribe to this entry?

 [2010-07-03 13:57 UTC] mr dot schyte at gmail dot com
The stats_cdf_t function doesn't work with values of 2 and 3 for the $which parameter. This is a problem in the supplied version of dcdflib. Replacing it with a newer version solves the problem.

Reproduce code:
    echo stats_cdf_t(3.0, 5.0, 1); // this one works
    echo stats_cdf_t(0.984950, 5.0, 2); // fails on this
    echo stats_cdf_t(0.984950, 3.0, 3); // and this

Expected result:

Actual result:
0.98495037605127 SMALL, X, BIG not monotone in INVR


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-17 01:42 UTC] wendellp at operamail dot com
This has not been fixed in v1.0.3.
 [2014-03-02 09:15 UTC] phoenix dot mstu at gmail dot com
i've fixed it using other version of dcdflib.c from here:

the problem is becouse of this C file is very old - 1997 year i guess. and all variables in its' function must have prefix static. 

static double c2 = .793650666825390e-03;
except of:
double c2 = .793650666825390e-03;

the code is really ugly, and im surprised its still alive...
 [2014-05-15 11:59 UTC] y dot uchiyama dot 1015 at gmail dot com
I also solved this problem by replacing DCDFLIB, RANDLIB, and FDLIBM with versions distributed at Netlib.  Bugs #57830, #57831, and #58394 were also solved.

I uploaded my instruction to solve the problem as a shell script.
 [2016-05-28 00:25 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: uchiyama
 [2016-05-28 05:22 UTC]
-Status: Assigned +Status: Closed
 [2016-05-28 05:22 UTC]
Fixed in version 1.0.4/2.0.2
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 22:01:28 2024 UTC