You are here

private static function PHPExcel_Calculation_Statistical::_beta in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php \PHPExcel_Calculation_Statistical::_beta()

* Beta function. * * @author Jaco van Kooten * *

Parameters

p require p>0: * @param q require q>0 * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php, line 99

Class

PHPExcel_Calculation_Statistical
PHPExcel_Calculation_Statistical

Code

private static function _beta($p, $q) {
  if ($p <= 0.0 || $q <= 0.0 || $p + $q > LOG_GAMMA_X_MAX_VALUE) {
    return 0.0;
  }
  else {
    return exp(self::_logBeta($p, $q));
  }
}