You are here

private static function PHPExcel_Calculation_Statistical::_logBeta in Loft Data Grids 6.2

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

* The natural logarithm of the beta function. * *

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 * @author Jaco van Kooten

2 calls to PHPExcel_Calculation_Statistical::_logBeta()
PHPExcel_Calculation_Statistical::_beta in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php
* Beta function. * * @author Jaco van Kooten * *
PHPExcel_Calculation_Statistical::_incompleteBeta in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php
* Incomplete beta function * * @author Jaco van Kooten * @author Paul Meagher * * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992). *

File

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

Class

PHPExcel_Calculation_Statistical
PHPExcel_Calculation_Statistical

Code

private static function _logBeta($p, $q) {
  if ($p != self::$_logBetaCache_p || $q != self::$_logBetaCache_q) {
    self::$_logBetaCache_p = $p;
    self::$_logBetaCache_q = $q;
    if ($p <= 0.0 || $q <= 0.0 || $p + $q > LOG_GAMMA_X_MAX_VALUE) {
      self::$_logBetaCache_result = 0.0;
    }
    else {
      self::$_logBetaCache_result = self::_logGamma($p) + self::_logGamma($q) - self::_logGamma($p + $q);
    }
  }
  return self::$_logBetaCache_result;
}