Class GammaLanczos

    • Constructor Detail

      • GammaLanczos

        public GammaLanczos()
        Construct an instance of a Gamma function, computed using the Lanczos approximation.
      • GammaLanczos

        public GammaLanczos​(double g,
                            int n,
                            int scale)
        Construct an instance of a Gamma function, computed using the Lanczos approximation.

        Recommended settings are

        g = 607.0 / 128.0; n = 15; scale = 30;
        Parameters:
        g - g
        n - n
        scale - precision
    • Method Detail

      • evaluate

        public double evaluate​(double x)
        Description copied from interface: Gamma
        Evaluate \(\Gamma(z) = \int_0^\infty e^{-t} t^{z-1} dt\).
        Specified by:
        evaluate in interface Gamma
        Specified by:
        evaluate in interface UnivariateRealFunction
        Parameters:
        x - x
        Returns:
        \(\Gamma(z)\)