note 92422 added to ref.math
| From: | michielthalentnetherlands at osu1 dot php dot net | Date: | Thu, 23 Jul 2009 17:41:39 +0000 |
| Subject: | note 92422 added to ref.math | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158651@lists.php.net to get a copy of this message | ||
With borrowing the factorial function of moikboy here is a poissonPdf function.
<?php
function fact($int){
if($int<2)return 1;
for($f=2;$int-1>1;$f*=$int--);
return $f;
}
function poissonPdf($l, $k) {
return ( exp(-$l)*pow($l,$k) ) / fact($k);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 85.145.30.83
----
Manual Page -- http://www.php.net/manual/en/ref.math.php
Edit -- https://master.php.net/note/edit/92422
Del: integrated -- https://master.php.net/note/delete/92422/integrated
Del: useless -- https://master.php.net/note/delete/92422/useless
Del: bad code -- https://master.php.net/note/delete/92422/bad+code
Del: spam -- https://master.php.net/note/delete/92422/spam
Del: non-english -- https://master.php.net/note/delete/92422/non-english
Del: in docs -- https://master.php.net/note/delete/92422/in+docs
Del: other reasons-- https://master.php.net/note/delete/92422
Reject -- https://master.php.net/note/reject/92422
Search -- https://master.php.net/manage/user-notes.php