You are here

public static function PHPExcel_Calculation_Statistical::GAMMALN 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::GAMMALN()

* GAMMALN * * Returns the natural logarithm of the gamma function. * *

Parameters

float $value: * @return float

File

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

Class

PHPExcel_Calculation_Statistical
PHPExcel_Calculation_Statistical

Code

public static function GAMMALN($value) {
  $value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
  if (is_numeric($value)) {
    if ($value <= 0) {
      return PHPExcel_Calculation_Functions::NaN();
    }
    return log(self::_gamma($value));
  }
  return PHPExcel_Calculation_Functions::VALUE();
}