Class Functions.GammaFunction

java.lang.Object
org.bzdev.math.Functions.GammaFunction
Enclosing class:
Functions

public static class Functions.GammaFunction extends Object
Class providing static methods for computing Gamma functions, their logarithms, and asymptotic values.
  • Method Details

    • Gamma

      public static double Gamma(double z)
      Compute the Gamma function. The function Γ(x) has poles at 0, -1, -2, -3, etc. At a poll, an infinite double-precision number is returned, with the choice of positive or negative infinity based on whether the value at x+δ is positive or negative respectively for δ>0, where δ is an arbitrarily small number.
      Parameters:
      z - a real number
      Returns:
      the value Γ(z)
    • logGamma

      public static double logGamma(double z)
      Compute the logarithm of the Gamma function
      Parameters:
      z - a non-negative number
      Returns:
      the value of log (Γ(x))
    • asymptoticValue

      public static double asymptoticValue(double x)
      Compute the asymptotic value of the Gamma function. The computation uses Nemes' approximation with up to a t6 term. Errors are less than 1 part in 1012 for t \gt; 20.

      Citation: http://www.ebyte.it/library/downloads/2007_MTH_Nemes_GammaFunction.pdf or http://dx.doi.org/10.3247/sl2math08.005

      Parameters:
      x - the argument, which must be positive
      Returns:
      an asymptotic approximation for Γ(x)
    • logAsymptoticValue

      public static double logAsymptoticValue(double x)
      Compute the asymptotic value of the logarithm of the Gamma function. The computation uses Nemes' approximation with up to a t6 term. Errors are less than 1 part in 1012 for t \gt; 20.

      Citation: http://www.ebyte.it/library/downloads/2007_MTH_Nemes_GammaFunction.pdf or http://dx.doi.org/10.3247/sl2math08.005

      Parameters:
      x - the argument, which must be positive
      Returns:
      an asymptotic approximation for log (Γ(x))