gamma-0.10.0.0: Gamma function and related functions.

Safe HaskellNone
LanguageHaskell2010

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

class Num a => Factorial a where Source #

Factorial function

Minimal complete definition

Nothing

Methods

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

Instances
Factorial Double Source # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial Float Source # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial Integer Source # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial (Complex Double) Source # 
Instance details

Defined in Math.Factorial

Methods

factorial :: Integral b => b -> Complex Double Source #

Factorial (Complex Float) Source # 
Instance details

Defined in Math.Factorial

Methods

factorial :: 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
IncGamma Double 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 details

Defined in Math.Gamma

IncGamma Float Source #

This instance uses the Double instance.

Instance details

Defined in Math.Gamma

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
GenGamma Double Source # 
Instance details

Defined in Math.Gamma

GenGamma Float Source # 
Instance details

Defined in Math.Gamma