I am trying the below mentioned code(PHP) to find probability. The calculation includes combination calculation of large numbers, using BCmaths function but not getting results. Please suggest, how this can be done.
function combin($n, $r)
{
$C = 1;
for ($i=0; $i < $n-$r; $i++)
{
$C = bcdiv(bcmul($C, $n-$i), $i+1);
}
return $C;
}
$dv = (combin(68, 17))*(combin((7866-68),(177-17)))/combin(7866, 177);
echo $dv;
?>```