QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
incompletegamma.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2003 Ferdinando Ametrano
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file incompletegamma.hpp
21 \brief Incomplete Gamma function
22*/
23
24#ifndef quantlib_math_incompletegamma_h
25#define quantlib_math_incompletegamma_h
26
27#include <ql/errors.hpp>
28#include <ql/types.hpp>
29#include <functional>
30
31namespace QuantLib {
32
33 //! Incomplete Gamma function
34 /*! Incomplete Gamma function
35
36 The implementation of the algorithm was inspired by
37 "Numerical Recipes in C", 2nd edition,
38 Press, Teukolsky, Vetterling, Flannery, chapter 6
39 */
41 Real x,
42 Real accuracy = 1.0e-13,
43 Integer maxIteration = 100);
45 Real x,
46 Real accuracy = 1.0e-13,
47 Integer maxIteration = 100);
49 Real a,
50 Real x,
51 Real accuracy = 1.0e-13,
52 Integer maxIteration = 100);
53
54}
55
56
57#endif
Classes and functions for error handling.
QL_REAL Real
real number
Definition: types.hpp:50
QL_INTEGER Integer
integer number
Definition: types.hpp:35
Definition: any.hpp:35
Real incompleteGammaFunctionSeriesRepr(Real a, Real x, Real accuracy, Integer maxIteration)
Real incompleteGammaFunction(Real a, Real x, Real accuracy, Integer maxIteration)
Incomplete Gamma function.
Real incompleteGammaFunctionContinuedFractionRepr(Real a, Real x, Real accuracy, Integer maxIteration)
Custom types.