QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
exponentialintegrals.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) 2020 Klaus Spanderen
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 exponentialintegrals.hpp
21*/
22
23#ifndef quantlib_exponentail_integral_hpp
24#define quantlib_exponentail_integral_hpp
25
26#include <ql/types.hpp>
27#include <complex>
28
29#ifndef M_EULER_MASCHERONI
30#define M_EULER_MASCHERONI 0.5772156649015328606065121
31#endif
32
33namespace QuantLib {
34 /*! References:
35
36 B. Rowe et al: GALSIM: The modular galaxy image simulation toolkit
37 https://arxiv.org/abs/1407.7676
38
39 V. Pegoraro, P. Slusallek:
40 On the Evaluation of the Complex-Valued Exponential Integral
41 https://www.sci.utah.edu/~vpegorar/research/2011_JGT.pdf
42
43 */
44
45 namespace ExponentialIntegral {
46 Real Si(Real x);
47 Real Ci(Real x);
48
49 std::complex<Real> Ci(const std::complex<Real>& z);
50 std::complex<Real> Si(const std::complex<Real>& z);
51 std::complex<Real> E1(const std::complex<Real>& z);
52 std::complex<Real> Ei(const std::complex<Real>& z);
53 }
54}
55
56#endif
QL_REAL Real
real number
Definition: types.hpp:50
std::complex< Real > Ei(const std::complex< Real > &z, const std::complex< Real > &acc)
std::complex< Real > E1(const std::complex< Real > &z)
Definition: any.hpp:35
Custom types.