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 #

Gamma function. Minimal definition is ether gamma or lnGamma.

Minimal complete definition

Nothing

Methods

gamma :: a -> a #

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

lnGamma :: a -> a #

Natural log of the gamma function

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

Natural log of the factorial function

Instances
Gamma Double # 
Instance details

Defined in Math.Gamma

Gamma Float # 
Instance details

Defined in Math.Gamma

Methods

gamma :: Float -> Float #

lnGamma :: Float -> Float #

lnFactorial :: Integral b => b -> Float #

Gamma (Complex Double) # 
Instance details

Defined in Math.Gamma

Gamma (Complex Float) # 
Instance details

Defined in Math.Gamma

class Num a => Factorial a where #

Factorial function

Minimal complete definition

Nothing

Methods

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

Instances
Factorial Double # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial Float # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial Integer # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial (Complex Double) # 
Instance details

Defined in Math.Factorial

Methods

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

Factorial (Complex Float) # 
Instance details

Defined in Math.Factorial

Methods

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

class Gamma a => IncGamma a where #

Incomplete gamma functions.

Methods

lowerGamma :: a -> a -> a #

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

lnLowerGamma :: a -> a -> a #

Natural log of lower gamma function

p :: a -> a -> a #

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

upperGamma :: a -> a -> a #

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

lnUpperGamma :: a -> a -> a #

Natural log of upper gamma function

q :: a -> a -> a #

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.

Instance details

Defined in Math.Gamma

IncGamma Float #

This instance uses the Double instance.

Instance details

Defined in Math.Gamma