Class GammaRatio

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private GammaRatio()
      Private constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double delta​(double a, double delta)
      Computes the ratio of gamma functions of a value and an offset value.
      static double value​(double a, double b)
      Computes the ratio of gamma functions of two values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GammaRatio

        private GammaRatio()
        Private constructor.
    • Method Detail

      • value

        public static double value​(double a,
                                   double b)
        Computes the ratio of gamma functions of two values.

        \[ \frac{\Gamma(a)}{\Gamma(b)} \]

        If either argument is <= 0 or infinite then the result is NaN.

        Parameters:
        a - Argument a (must be positive finite).
        b - Argument b (must be positive finite).
        Returns:
        \( \Gamma(a) / \Gamma(b) \)
      • delta

        public static double delta​(double a,
                                   double delta)
        Computes the ratio of gamma functions of a value and an offset value.

        \[ \frac{\Gamma(a)}{\Gamma(a + delta)} \]

        Note that the result is calculated accurately even when delta is small compared to a: indeed even if a+delta ~ a. The function is typically used when a is large and delta is very small.

        Parameters:
        a - Argument.
        delta - Argument.
        Returns:
        \( \Gamma(a) / \Gamma(a + delta) \)