gamma-0.9.0.1: Gamma function and related functions.

Math.Gamma

Synopsis

# Documentation

class (Floating a, Factorial a) => Gamma a whereSource

Gamma function. Minimal definition is ether `gamma` or `lnGamma`.

Methods

gamma :: a -> aSource

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

lnGamma :: a -> aSource

Natural log of the gamma function

lnFactorial :: Integral b => b -> aSource

Natural log of the factorial function

Instances

 Gamma Double Gamma Float Gamma (Complex Double) Gamma (Complex Float)

class Num a => Factorial a whereSource

Factorial function

Methods

factorial :: Integral b => b -> aSource

Instances

 Factorial Double Factorial Float Factorial Integer Factorial (Complex Double) Factorial (Complex Float)

class Gamma a => IncGamma a whereSource

Incomplete gamma functions.

Methods

lowerGamma :: a -> a -> aSource

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

lnLowerGamma :: a -> a -> aSource

Natural log of lower gamma function

p :: a -> a -> aSource

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

upperGamma :: a -> a -> aSource

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

lnUpperGamma :: a -> a -> aSource

Natural log of upper gamma function

q :: a -> a -> aSource

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

Instances

 IncGamma Double I have not yet come up with a good strategy for evaluating these functions for negative `x`. They can be rather numerically unstable. IncGamma Float This instance uses the Double instance.