QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Private Attributes | List of all members
GammaFunction Class Reference

Gamma function class. More...

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

+ Collaboration diagram for GammaFunction:

Public Member Functions

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

Public Attributes

QL_DEPRECATED typedef Real argument_type
 
QL_DEPRECATED typedef Real result_type
 

Static Private Attributes

static const Real c1_ = 76.18009172947146
 
static const Real c2_ = -86.50532032941677
 
static const Real c3_ = 24.01409824083091
 
static const Real c4_ = -1.231739572450155
 
static const Real c5_ = 0.1208650973866179e-2
 
static const Real c6_ = -0.5395239384953e-5
 

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.

Definition at line 68 of file gammadistribution.hpp.

Member Function Documentation

◆ value()

Real value ( Real  x) const

Definition at line 84 of file gammadistribution.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ logValue()

Real logValue ( Real  x) const

Definition at line 69 of file gammadistribution.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ argument_type

QL_DEPRECATED typedef Real argument_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 74 of file gammadistribution.hpp.

◆ result_type

QL_DEPRECATED typedef Real result_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 80 of file gammadistribution.hpp.

◆ c1_

const Real c1_ = 76.18009172947146
staticprivate

Definition at line 85 of file gammadistribution.hpp.

◆ c2_

const Real c2_ = -86.50532032941677
staticprivate

Definition at line 85 of file gammadistribution.hpp.

◆ c3_

const Real c3_ = 24.01409824083091
staticprivate

Definition at line 85 of file gammadistribution.hpp.

◆ c4_

const Real c4_ = -1.231739572450155
staticprivate

Definition at line 85 of file gammadistribution.hpp.

◆ c5_

const Real c5_ = 0.1208650973866179e-2
staticprivate

Definition at line 85 of file gammadistribution.hpp.

◆ c6_

const Real c6_ = -0.5395239384953e-5
staticprivate

Definition at line 85 of file gammadistribution.hpp.