gamma-0.9.0.2: Gamma function and related functions.
Safe HaskellNone
LanguageHaskell98

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

Instances details
Gamma Double Source # 
Instance details

Defined in Math.Gamma

Gamma Float Source # 
Instance details

Defined in Math.Gamma

Gamma (Complex Double) Source # 
Instance details

Defined in Math.Gamma

Gamma (Complex Float) Source # 
Instance details

Defined in Math.Gamma

class Num a => Factorial a where Source #

Factorial function

Minimal complete definition

Nothing

Methods

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

Instances

Instances details
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

Instances details
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