note 129741 added to function.stats-dens-normal
| From: | oran@emerg.co.nz | Date: | Mon, 09 Sep 2024 02:19:45 +0000 |
| Subject: | note 129741 added to function.stats-dens-normal | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221523@lists.php.net to get a copy of this message | ||
If you don't have the stats package and can't install it, I have found this to work:
<?php
if (!function_exists('stats_dens_normal')) {
function stats_dens_normal(float $x, float $ave, float $stdev): float
{
$A = $stdev * sqrt(2 * M_PI);
$B = -pow($x - $ave, 2);
$C = 2 * pow($stdev, 2);
return (1 / $A) * pow(M_E, $B / $C);
}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 203.97.21.86)
----
Manual Page -- https://php.net/manual/en/function.stats-dens-normal.php
Edit -- https://main.php.net/note/edit/129741
Del: integrated -- https://main.php.net/note/delete/129741/integrated
Del: useless -- https://main.php.net/note/delete/129741/useless
Del: bad code -- https://main.php.net/note/delete/129741/bad+code
Del: spam -- https://main.php.net/note/delete/129741/spam
Del: non-english -- https://main.php.net/note/delete/129741/non-english
Del: in docs -- https://main.php.net/note/delete/129741/in+docs
Del: other reasons-- https://main.php.net/note/delete/129741
Reject -- https://main.php.net/note/reject/129741
Search -- https://main.php.net/manage/user-notes.php