Skip to content

Commit

Permalink
comment out unreachable code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Beakerboy committed Oct 11, 2021
1 parent ac75195 commit ab72e0e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/Probability/Distribution/Continuous/StudentT.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ private static function stirlerr(float $n)

if ($n <= 15.0) {
$nn = $n + $n;
if ($nn == (int)$nn) {
return $sferr_halves[$nn];
}
$M_LN_SQRT_2PI = log(sqrt(2 * \pi()));
return self::lgammafn($n + 1) - ($n + 0.5) * log($n) + $n - $M_LN_SQRT_2PI;
//if ($nn == (int)$nn) {
return $sferr_halves[$nn];
//}
//$M_LN_SQRT_2PI = log(sqrt(2 * \pi()));
//return self::lgammafn($n + 1) - ($n + 0.5) * log($n) + $n - $M_LN_SQRT_2PI;
}

$nn = $n * $n;
Expand All @@ -318,9 +318,4 @@ private static function stirlerr(float $n)
/* 15 < n <= 35 : */
return ($S0-($S1-($S2-($S3-$S4/$nn)/$nn)/$nn)/$nn)/$n;
}

private static function lgammafn($x)
{
return log(Special::gamma($x));
}
}

0 comments on commit ab72e0e

Please sign in to comment.