IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Meta.Numerics.Functions.AdvancedComplexMath Class Reference

Contains methods that compute advanced functions of complex arguments. More...

Static Public Member Functions

static Complex Faddeeva (Complex z)
 Computes the complex Faddeeva function. More...
 
static Complex Erf (Complex z)
 Computes the complex error function. More...
 
static Complex Ein (Complex z)
 Computes the entire complex exponential integral. More...
 
static Complex Gamma (Complex z)
 Computes the complex Gamma function. More...
 
static Complex LogGamma (Complex z)
 Compute the complex log Gamma function. More...
 
static Complex Psi (Complex z)
 Computes the complex digamma (ψ) function. More...
 
static Complex DiLog (Complex z)
 Computes the complex dilogarithm function, also called Spence's function. More...
 
static Complex RiemannZeta (Complex z)
 Computes the Riemann zeta function for complex values. More...
 

Static Private Member Functions

static Complex Faddeeva_Weideman (Complex z)
 
static Complex Erf_Series (Complex z)
 
static Complex Faddeeva_ContinuedFraction (Complex z)
 
static Complex Faddeeva_Taylor (Complex z0, Complex w0, Complex dz)
 
static Complex Ein_Series (Complex z)
 
static Complex IntegeralE1_ContinuedFraction (Complex z)
 
static Complex IntegralEi_AsymptoticSeries (Complex z)
 
static bool IsEinSeriesPrefered (Complex z)
 
static Complex LogGamma_Stirling (Complex z)
 
static Complex DiLog_Series_0 (Complex z)
 
static Complex DiLog_Series_1 (Complex e)
 
static Complex DiLog_Log_Series (Complex z)
 
static Complex RiemannZeta_LaurentSeries (Complex z)
 
static int RiemannZeta_EulerMaclaurin_N (double s, double t)
 
static Complex RiemannZeta_EulerMaclaurin (Complex z, int n)
 

Static Private Attributes

static readonly double Faddeeva_Weideman_L = Math.Sqrt(40.0 / Math.Sqrt(2.0))
 
static readonly double[] Faddeeva_Weideman_Coefficients
 
static readonly double baseN = Math.Log(2.0 / Global.Accuracy)
 

Detailed Description

Contains methods that compute advanced functions of complex arguments.

Member Function Documentation

static Complex Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva ( Complex  z)
inlinestatic

Computes the complex Faddeeva function.

Parameters
zThe complex argument.
Returns
The complex value of w(z).

The Faddeeva function w(z) is related to the error function with a complex argument.

It also has an integral representation.

For purely imaginary values, it reduces to the complementary error function (AdvancedMath.Erfc). For purely real values, it reduces to Dawson's integral (AdvancedMath.Dawson).

It appears in the computation of the Voigt line profile function V(x;σ,γ).

Near the origin, w(z) ≈ 1. To accurately determine w(z) - 1 in this region, use the Erf function. Away from the origin near the large negative imaginary axis, the magnitude w(z) increases rapidly and may overflow.

See also
AdvancedComplexMath.Erf, AdvancedMath.Erf, AdvancedMath.Erfc, AdvancedMath.Dawson

References Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.ComplexMath.Exp(), Meta.Numerics.ComplexMath.I, and Meta.Numerics.Complex.Im.

Referenced by Test.AdvancedComplexMathTest.ComplexErfFaddevaAgreement(), Test.AdvancedComplexMathTest.ComplexFaddeevaConjugation(), Test.AdvancedComplexMathTest.ComplexFaddeevaDawson(), and Test.AdvancedComplexMathTest.ComplexFaddeevaSpecialCase().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva_Weideman ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Erf_Series ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Erf ( Complex  z)
inlinestatic

Computes the complex error function.

Parameters
zThe complex argument.
Returns
The value of erf(z).

This function is the analytic continuation of the error function (AdvancedMath.Erf) to the complex plane.

The image below shows the complex error function near the origin, using domain coloring.

The complex error function is entire: it has no poles, cuts, or discontinuities anywhere in the complex plane.

For pure imaginary arguments, erf(z) reduces to the Dawson integral (AdvancedMath.Dawson).

Away from the origin near the real axis, the real part of erf(z) quickly approaches ±1. To accurately determine the small difference erf(z) ∓ 1 in this region, use the Faddeeva function. Away from the origin near the imaginary axis, the magnitude of erf(z) increases very quickly. Although erf(z) may overflow in this region, you can still accurately determine the value of the product erf(z) exp(z2) using the Faddeeva function.

See also
AdvancedMath.Erf, AdvancedMath.Dawson, AdvancedComplexMath.Faddeeva

References Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.ComplexMath.Exp(), Meta.Numerics.ComplexMath.I, and Meta.Numerics.Complex.Re.

Referenced by Test.AdvancedComplexMathTest.ComplexErfFaddevaAgreement(), Test.AdvancedComplexMathTest.ComplexErfFresnel(), Test.AdvancedComplexMathTest.ComplexErfSpecialCase(), and Test.AdvancedComplexMathTest.ComplexErfSymmetries().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva_ContinuedFraction ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva_Taylor ( Complex  z0,
Complex  w0,
Complex  dz 
)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Ein ( Complex  z)
inlinestatic

Computes the entire complex exponential integral.

Parameters
zThe complex argument.
Returns
The value of Ein(z).

The entire exponential integral function can be defined by an integral or an equivalent series.

Both Ei(z) and E1(x) and be obtained from Ein(z).

Unlike either Ei(z) or E1(z), Ein(z) is entire, that is, it has no poles or cuts anywhere in the complex plane.

References Meta.Numerics.Functions.AdvancedMath.EulerGamma, Meta.Numerics.ComplexMath.Log(), and Meta.Numerics.Complex.Re.

Referenced by Test.AdvancedComplexMathTest.ComplexEinAgreement().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.Ein_Series ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.IntegeralE1_ContinuedFraction ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.IntegralEi_AsymptoticSeries ( Complex  z)
inlinestaticprivate
static bool Meta.Numerics.Functions.AdvancedComplexMath.IsEinSeriesPrefered ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Gamma ( Complex  z)
inlinestatic

Computes the complex Gamma function.

Parameters
zThe complex argument.
Returns
The complex value of Γ(z).

The image below shows the complex Γ function near the origin using domain coloring.

See also
AdvancedMath.Gamma(double)

References Meta.Numerics.ComplexMath.Exp(), Meta.Numerics.Complex.Re, and Meta.Numerics.ComplexMath.Sin().

Referenced by Test.AdvancedComplexMathTest.ComplexGammaConjugation(), Test.AdvancedComplexMathTest.ComplexGammaInequality(), Test.AdvancedComplexMathTest.ComplexGammaKnownLines(), Test.AdvancedComplexMathTest.ComplexGammaRecurrance(), and Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.LogGamma ( Complex  z)
inlinestatic

Compute the complex log Gamma function.

Parameters
zThe complex argument, which must have a non-negative real part.
Returns
The complex value ln(Γ(z)).
Exceptions
ArgumentOutOfRangeExceptionThe real part of z is negative.
See also
AdvancedMath.LogGamma

References Meta.Numerics.ComplexMath.Abs(), and Meta.Numerics.Complex.Re.

Referenced by Test.AdvancedComplexMathTest.ComplexLogGammaAgreement(), Test.AdvancedComplexMathTest.ComplexLogGammaConjugation(), and Meta.Numerics.Functions.AdvancedMath.Coulomb_Asymptotic().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.LogGamma_Stirling ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.Psi ( Complex  z)
inlinestatic

Computes the complex digamma (ψ) function.

Parameters
zThe complex argument.
Returns
The value of ψ(z).

The image below shows the complex ψ function near the origin using domain coloring.

See also
AdvancedMath.Psi(double)

References Meta.Numerics.Complex.Re, and Meta.Numerics.ComplexMath.Tan().

Referenced by Test.AdvancedComplexMathTest.ComplexPsiConjugation(), Test.AdvancedComplexMathTest.ComplexPsiDuplication(), Test.AdvancedComplexMathTest.ComplexPsiImaginaryParts(), Test.AdvancedComplexMathTest.ComplexPsiRecurrence(), and Meta.Numerics.Functions.AdvancedMath.Coulomb_Zero_Series().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.DiLog ( Complex  z)
inlinestatic

Computes the complex dilogarithm function, also called Spence's function.

Parameters
zThe complex argument.
Returns
The value Li2(z).

This function is the analyic continuation of the dilogarithm function (AdvancedMath.DiLog) into the complex plane.

The image below shows the complex dilogarithm function near the origin, using domain coloring.

See also
AdvancedMath.DiLog

References Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.Complex.Conjugate, Meta.Numerics.Complex.Im, Meta.Numerics.ComplexMath.Log(), and Meta.Numerics.Complex.Re.

Referenced by Test.AdvancedComplexMathTest.ComplexDiLogAgreement(), Test.AdvancedComplexMathTest.ComplexDiLogBranchCut(), Test.AdvancedComplexMathTest.ComplexDiLogClausen(), Test.AdvancedComplexMathTest.ComplexDiLogConjugation(), Test.AdvancedComplexMathTest.ComplexDiLogSymmetry(), and Test.AdvancedComplexMathTest.ComplexDiLogUnitCircle().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.DiLog_Series_0 ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.DiLog_Series_1 ( Complex  e)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.DiLog_Log_Series ( Complex  z)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta ( Complex  z)
inlinestatic

Computes the Riemann zeta function for complex values.

Parameters
zThe argument.
Returns
The value of ζ(z).

As the imaginary part of the argument increases, the computation of the zeta function becomes slower and more difficult. The computation time is approximately proprotional to the imaginary part of z. The result also slowly looses accuracy for arguments with very large imaginary parts; for arguments with z.Im of order 10^d, approximately the last d digits of the result are suspect.

References Meta.Numerics.ComplexMath.Abs(), Meta.Numerics.Complex.Conjugate, Meta.Numerics.ComplexMath.Cos(), Meta.Numerics.Functions.AdvancedComplexMath.Gamma(), Meta.Numerics.Complex.Im, Meta.Numerics.Complex.One, Meta.Numerics.ComplexMath.Pow(), and Meta.Numerics.Complex.Re.

Referenced by Test.AdvancedComplexMathTest.ComplexRealRiemannZetaAgreement(), Test.AdvancedComplexMathTest.ComplexReimannZetaPrimesTest(), and Test.AdvancedComplexMathTest.ComplexRiemannZetaZeros().

static Complex Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta_LaurentSeries ( Complex  z)
inlinestaticprivate
static int Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta_EulerMaclaurin_N ( double  s,
double  t 
)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedComplexMath.RiemannZeta_EulerMaclaurin ( Complex  z,
int  n 
)
inlinestaticprivate

Member Data Documentation

readonly double Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva_Weideman_L = Math.Sqrt(40.0 / Math.Sqrt(2.0))
staticprivate
readonly double [] Meta.Numerics.Functions.AdvancedComplexMath.Faddeeva_Weideman_Coefficients
staticprivate
readonly double Meta.Numerics.Functions.AdvancedComplexMath.baseN = Math.Log(2.0 / Global.Accuracy)
staticprivate

The documentation for this class was generated from the following files: