MathPHP\Functions\Special::Γ PHP Метод

Γ() публичный статический Метод

Gamma function convenience method
public static Γ ( number $n ) : number
$n number
Результат number
    public static function Γ($n)
    {
        return self::gamma($n);
    }

Usage Example

Пример #1
0
 /**
  * Cumulative distribution function
  *
  * Cumulative t value up to a point, left tail.
  *
  *          / k   x  \
  *       γ |  - , -  |
  *          \ 2   2 /
  * CDF = -------------
  *            / k \
  *         Γ |  -  |
  *            \ 2 /
  *
  * @param number $x Chi-square critical value (CV) > 0
  * @param int    $k degrees of freedom > 0
  *
  * @return number cumulative probability
  */
 public static function CDF($x, int $k)
 {
     Support::checkLimits(self::LIMITS, ['x' => $x, 'k' => $k]);
     // Numerator
     $γ⟮k/2、x/2⟯ = Special::γ($k / 2, $x / 2);
     // Demoninator
     $Γ⟮k/2⟯ = Special::Γ($k / 2);
     return $γ⟮k/2、x/2⟯ / $Γ⟮k/2⟯;
 }