QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Types | Public Member Functions | List of all members
GammaFunction Class Reference

Gamma function class. More...

#include <ql/math/distributions/gammadistribution.hpp>

Public Types

typedef Real argument_type
 
typedef Real result_type
 

Public Member Functions

Real value (Real x) const
 
Real logValue (Real x) const
 

Detailed Description

Gamma function class.

This is a function defined by

\[ \Gamma(z) = \int_0^{\infty}t^{z-1}e^{-t}dt \]

The implementation of the algorithm was inspired by "Numerical Recipes in C", 2nd edition, Press, Teukolsky, Vetterling, Flannery, chapter 6

Tests:
the correctness of the returned value is tested by checking it against known good results.