gamma-0.10.0.0: Gamma function and related functions.

Math.Gamma

Synopsis

# Documentation

class (Eq a, Floating a, Factorial a) => Gamma a where Source #

Gamma function. Minimal definition is ether gamma or lnGamma.

Minimal complete definition

Nothing

Methods

gamma :: a -> a Source #

The gamma function: gamma z == integral from 0 to infinity of t -> t**(z-1) * exp (negate t)

lnGamma :: a -> a Source #

Natural log of the gamma function

lnFactorial :: Integral b => b -> a Source #

Natural log of the factorial function

Instances
 Source # Instance detailsDefined in Math.Gamma MethodslnFactorial :: Integral b => b -> Double Source # Source # Instance detailsDefined in Math.Gamma MethodslnFactorial :: Integral b => b -> Float Source # Source # Instance detailsDefined in Math.Gamma MethodslnFactorial :: Integral b => b -> Complex Double Source # Source # Instance detailsDefined in Math.Gamma MethodslnFactorial :: Integral b => b -> Complex Float Source #

class Num a => Factorial a where Source #

Factorial function

Minimal complete definition

Nothing

Methods

factorial :: Integral b => b -> a Source #

Instances
 Source # Instance detailsDefined in Math.Factorial Methodsfactorial :: Integral b => b -> Double Source # Source # Instance detailsDefined in Math.Factorial Methodsfactorial :: Integral b => b -> Float Source # Source # Instance detailsDefined in Math.Factorial Methodsfactorial :: Integral b => b -> Integer Source # Source # Instance detailsDefined in Math.Factorial Methodsfactorial :: Integral b => b -> Complex Double Source # Source # Instance detailsDefined in Math.Factorial Methodsfactorial :: Integral b => b -> Complex Float Source #

class Gamma a => IncGamma a where Source #

Incomplete gamma functions.

Methods

lowerGamma :: a -> a -> a Source #

Lower gamma function: lowerGamma s x == integral from 0 to x of t -> t**(s-1) * exp (negate t)

lnLowerGamma :: a -> a -> a Source #

Natural log of lower gamma function

p :: a -> a -> a Source #

Regularized lower incomplete gamma function: lowerGamma s x / gamma s

upperGamma :: a -> a -> a Source #

Upper gamma function: lowerGamma s x == integral from x to infinity of t -> t**(s-1) * exp (negate t)

lnUpperGamma :: a -> a -> a Source #

Natural log of upper gamma function

q :: a -> a -> a Source #

Regularized upper incomplete gamma function: upperGamma s x / gamma s

Instances
 Source # I have not yet come up with a good strategy for evaluating these functions for negative x. They can be rather numerically unstable. Instance detailsDefined in Math.Gamma Methods Source # This instance uses the Double instance. Instance detailsDefined in Math.Gamma Methodsp :: Float -> Float -> Float Source #q :: Float -> Float -> Float Source #

class Gamma a => GenGamma a where Source #

Generalized gamma function (also known as multivariate gamma function). See http://en.wikipedia.org/wiki/Multivariate_gamma_function (Fetched Feb 29, 2012).

Methods

generalizedGamma :: Int -> a -> a Source #

Generalized gamma function. generalizedGamma p x = (pi ** ((p - 1) / 2)) * gamma x * generalizedGamma (p - 1) (x - 0.5)

lnGeneralizedGamma :: Int -> a -> a Source #

Natural log of generalizedGamma

Instances
 Source # Instance detailsDefined in Math.Gamma Methods Source # Instance detailsDefined in Math.Gamma Methods