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.AdvancedMath Class Reference

Contains methods that compute advanced functions with real arguments. More...

Static Public Member Functions

static double BesselJ (int n, double x)
 Computes the regular Bessel function for integer orders. More...
 
static double BesselY (int n, double x)
 Computes the irregular Bessel function for integer orders. More...
 
static double BesselJ (double nu, double x)
 Computes the regular Bessel function for real orders. More...
 
static double BesselY (double nu, double x)
 Computes the irregual Bessel function for real orders. More...
 
static SolutionPair Bessel (double nu, double x)
 Computes both solutions of the Bessel differential equation. More...
 
static double SphericalBesselJ (int n, double x)
 Computes the regular spherical Bessel function of integer order. More...
 
static double SphericalBesselY (int n, double x)
 Computes the irregular spherical Bessel function of integer order. More...
 
static double CoulombF (int L, double eta, double rho)
 Computes the regular Coulomb wave function. More...
 
static double CoulombG (int L, double eta, double rho)
 Computes the irregular Coulomb wave function. More...
 
static double CarlsonF (double x, double y, double z)
 Computes the Carslon elliptic integral RF. More...
 
static double CarlsonD (double x, double y, double z)
 Computes the Carlson integral RD. More...
 
static double EllipticK (double k)
 Computes the complete elliptic integral of the first kind. More...
 
static double EllipticF (double phi, double k)
 Computes the incomplete elliptic integral of the first kind. More...
 
static double EllipticE (double k)
 Computes the complete elliptic integral of the second kind. More...
 
static double EllipticE (double phi, double k)
 Computes the incomplete elliptic integral of the second kind. More...
 
static double Erf (double x)
 Computes the error function. More...
 
static double Erfc (double x)
 Computes the complementary error function. More...
 
static double InverseErfc (double y)
 Computes the inverse complementary error function. More...
 
static double InverseErf (double y)
 Computes the inverse error function. More...
 
static double IntegralEi (double x)
 Computes the principal value of the exponential integral. More...
 
static double IntegralE (int n, double x)
 Computes the exponential integral. More...
 
static double IntegralCi (double x)
 Computes the cosine integral. More...
 
static double IntegralSi (double x)
 Computes the sine integral. More...
 
static double IntegralTi (double x)
 Computes the inverse tangent integral. More...
 
static double LogGamma (double x)
 Computes the natural logrithm of the Gamma function. More...
 
static double Gamma (double x)
 Computes the Gamma function. More...
 
static double Psi (double x)
 Computes the digamma function. More...
 
static double Psi (int n, double x)
 Computes the polygamma function. More...
 
static double Beta (double a, double b)
 Computes the Beta function. More...
 
static double LogBeta (double a, double b)
 Computes the lograrithm of the Beta function. More...
 
static double LeftRegularizedGamma (double a, double x)
 Computes the normalized lower (left) incomplete Gamma function. More...
 
static double RightRegularizedGamma (double a, double x)
 Computes the normalized upper (right) incomplete Gamma function. More...
 
static double Gamma (double a, double x)
 Computes the upper incomplete Gamma function. More...
 
static double Beta (double a, double b, double x)
 Computes the incomplete Beta function. More...
 
static double LeftRegularizedBeta (double a, double b, double x)
 Computes the regularized incomplete Beta function. More...
 
static Complex SphericalHarmonic (int l, int m, double theta, double phi)
 Computes the value of a spherical harmonic function. More...
 
static double LambertW (double x)
 Computes the Lambert W function. More...
 
static SolutionPair ModifiedBessel (double nu, double x)
 Computes modified cylindrical Bessel functions. More...
 
static double ModifiedBesselI (double nu, double x)
 Computes the regular modified cynlindrical Bessel function. More...
 
static double ModifiedBesselK (double nu, double x)
 Computes the irregular modified cynlindrical Bessel function. More...
 
static double AiryAi (double x)
 Computes the Airy function of the first kind. More...
 
static double AiryBi (double x)
 Computes the Airy function of the second kind. More...
 
static SolutionPair Airy (double x)
 Computes both Airy functions and their derivatives. More...
 
static double DiLog (double x)
 Computes the dilogarathm function, also called Spence's function. More...
 
static double PolyLog (int n, double x)
 Computes the polylogarithm function. More...
 
static double Clausen (double t)
 Computes the Clausen integral. More...
 
static double RiemannZeta (double x)
 Compute the Riemann zeta function. More...
 
static double DirichletEta (double x)
 Computes the Dirichlet eta function. More...
 

Public Attributes

const double EulerGamma = 0.577215664901532860606512
 The Euler constant. More...
 
const double Catalan = 0.915965594177219015054604
 Catalan's constant. More...
 

Static Public Attributes

static readonly double GoldenRatio = (1.0 + Math.Sqrt(5.0)) / 2.0
 The golden ratio. More...
 

Private Member Functions

< summary > Computes the
Dawson integral.</summary >
< paramname="x"> The argument.
</param >< returns > The value
of 
F (x).</returns >< remarks >< para >The Dawson function is defined by the integral
 
< summary > Computes the
Fresnel cosine integral.
</summary >< paramname="x">
The argument.</param >
< returns > The value of 
C (x).</returns >< remarks >< para >The Fresnel cosine integral is defined as
 
< summary > Computes the
Fresnel sine integral.
</summary >< paramname="x">
The argument.</param >
< returns > The value of 
S (x).</returns >< remarks >< para >The Fresnel sine integral is defined as
 

Static Private Member Functions

static double BesselJ_Series (int n, double x)
 
static void BesselY_Series (double x, out double Y0, out double Y1)
 
static void BesselY_Series (double nu, double x, out double Y0, out double Y1)
 
static double BesselJ_Series (double nu, double x)
 
static void BesselJ_Series (double nu, double x, out double J, out double JP)
 
static double Bessel_CF1 (double nu, double x, out int sign)
 
static Complex Bessel_CF2 (double nu, double x)
 
static void Bessel_RecurrUpward (double nu, double x, ref double F, ref double FP, int n)
 
static SolutionPair Bessel_Steed (double nu, double x)
 
static SolutionPair Bessel_Steed (double r, Complex z, double W, int sign)
 
static SolutionPair Bessel_Asymptotic (double nu, double x)
 
static double SphericalBesselJ_Zero (double x)
 
static double SphericalBesselJ_SeriesOne (double x)
 
static double SphericalBesselJ_One (double x)
 
static double SphericalBesselJ_Series (int n, double x)
 
static double SphericalBesselY_Series (int n, double x)
 
static double SphericalBesselY_Zero (double x)
 
static double SphericalBesselY_SeriesOne (double x)
 
static double SphericalBesselY_One (double x)
 
static double SphericalBesselJ_Miller (int n, double x)
 
static double CoulombFactorZero (double eta)
 
static double CoulombFactor (int L, double eta)
 
static void CoulombF_Series (int L, double eta, double rho, out double F, out double FP)
 
static void Coulomb_Zero_Series (double eta, double rho, out double F, out double FP, out double G, out double GP)
 
static SolutionPair Coulomb_Steed (double L, double eta, double rho)
 
static double Coulomb_CF1 (double L, double eta, double rho, out int sign)
 
static Complex Coulomb_CF2 (double L, double eta, double rho)
 
static void Coulomb_Asymptotic (double L, double eta, double rho, out double F, out double G)
 
static double CoulombTurningPoint (double L, double eta)
 
static void Coulomb_Recurse_Upward (int L1, int L2, double eta, double rho, ref double U, ref double UP)
 
static double CoulombF_Integrate (int L, double eta, double rho)
 
static double EllipticK_Series (double k)
 
static double EllipticK_Asymptotic (double k1)
 
static double Elliptic_AGM (double k)
 
static double EllipticE_Series (double k)
 
static double EllipticE_Asymptotic (double k1)
 
static double Erf_Series (double x)
 
static double Erfc_ContinuedFraction (double x)
 
static double InverseErfSeries (double x)
 
static double[] ComputeInverseErfSeriesCoefficients (int n)
 
static double InverseErfcByRefinement (double y)
 
static double InverseErfcAsymptoticExpansion (double x)
 
static double InverseErfcRationalApproximation (double x)
 
static double Dawson_Series (double x)
 
static double Dawson_Asymptotic (double x)
 
static double Dawson_Rybicki (double x)
 
static double[] Compute_Dawson_Rybicki_Coefficients (double h, int n)
 
static double IntegralEi_Series (double x)
 
static double IntegralEi_Asymptotic (double x)
 
static double IntegralE_Series (int n, double x)
 
static double IntegralE_ContinuedFraction (int n, double x)
 
static double IntegralSi_Series (double x)
 
static double IntegralCi_Series (double x)
 
static Complex IntegralE1_Imaginary_ContinuedFraction (double x)
 
static double IntegralTi_Series (double x)
 
static double IntegralTi_LogSeries (double x)
 
static double[] ComputeCotDerivative (int n)
 
static double EvaluateCotDerivative (double[] p, double x)
 
static double PowOverBeta (double a, double b, double x)
 
static double GammaP_Series (double a, double x)
 
static double GammaQ_ContinuedFraction (double a, double x)
 
static void Gamma_Temme (double a, double x, out double P, out double Q)
 
static double Lambert_Halley (double x, double w0)
 
static double Lambert_SeriesZero (double x)
 
static double Lambert_SeriesSmall (double x)
 
static double Lambert_SeriesLarge (double x)
 
static void ModifiedBesselK_RecurrUpward (double mu, double x, ref double K, ref double KP, int n)
 
static void ModifiedBesselI_Series (double nu, double x, out double I, out double IP)
 
static double ModifiedBesselI_Series (double nu, double x)
 
static void ModifiedBessel_Asymptotic (double nu, double x, out double sI, out double sIP, out double sK, out double sKP)
 
static double ModifiedBessel_CF1 (double nu, double x)
 
static void ModifiedBessel_CF_K (double nu, double x, out double K, out double g)
 
static void ModifiedBesselK_Series (double nu, double x, out double K0, out double K1)
 
static double AiryAi_Series (double x)
 
static double AiryBi_Series (double x)
 
static SolutionPair Airy_Series (double x)
 
static double DiLog_Series (double x)
 
static double PolyLog_BernoulliSum (int n, double w)
 
static double PolyLog_Series (int n, double x)
 
static double PolyLog_LogSeries (int n, double x)
 
static double ClausenNearZero (double t)
 
static double ClausenNearPi (double t)
 
static double DirichletEta_Borwein (double x)
 
static double[] ComputeBorweinEtaCoefficients (int n)
 
static double RiemannZeta_LaurentSeries (double x)
 

Private Attributes

const double Dawson_Rybicki_h = 0.25
 
const double EI = 1.0 / Math.E
 

Static Private Attributes

static readonly decimal dPI2 = 2.0m * 3.1415926535897932384626433832795m
 
static readonly double dmax = Convert.ToDouble(Decimal.MaxValue)
 
static readonly double c4 = Math.Pow(2.0, 2.0 / 3.0)
 
static readonly double SqrtAccuracy = Math.Sqrt(Global.Accuracy)
 
static readonly double[] inverfSeriesCoefficients = ComputeInverseErfSeriesCoefficients(24)
 
static readonly double[] Dawson_Rybicki_coefficients = Compute_Dawson_Rybicki_Coefficients(0.25, 16)
 
static readonly double[][] TemmeD
 
static readonly double[] DirichletEta_BorweinCoefficients = ComputeBorweinEtaCoefficients(16)
 

Detailed Description

Contains methods that compute advanced functions with real arguments.

Member Function Documentation

static double Meta.Numerics.Functions.AdvancedMath.BesselJ ( int  n,
double  x 
)
inlinestatic
static double Meta.Numerics.Functions.AdvancedMath.BesselJ_Series ( int  n,
double  x 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.BesselY_Series ( double  x,
out double  Y0,
out double  Y1 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.BesselY_Series ( double  nu,
double  x,
out double  Y0,
out double  Y1 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.BesselJ_Series ( double  nu,
double  x 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.BesselJ_Series ( double  nu,
double  x,
out double  J,
out double  JP 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Bessel_CF1 ( double  nu,
double  x,
out int  sign 
)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedMath.Bessel_CF2 ( double  nu,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.BesselJ ( double  nu,
double  x 
)
inlinestatic

Computes the regular Bessel function for real orders.

Parameters
nuThe order parameter.
xThe argument, which must be non-negative.
Returns
The value of J&#x3BD;(x).

For information on the cylindrical Bessel functions, see AdvancedMath.Bessel.

Exceptions
ArgumentOutOfRangeExceptionx is negative.

References Meta.Numerics.Functions.SolutionPair.FirstSolutionValue.

static double Meta.Numerics.Functions.AdvancedMath.BesselY ( double  nu,
double  x 
)
inlinestatic

Computes the irregual Bessel function for real orders.

Parameters
nuThe order parameter.
xThe argument, which must be non-negative.
Returns
The value of Y&#x3BD;(x).

For information on the cylindrical Bessel functions, see AdvancedMath.Bessel.

Exceptions
ArgumentOutOfRangeExceptionx is negative.
See also
Bessel

References Meta.Numerics.Functions.SolutionPair.SecondSolutionDerivative, and Meta.Numerics.Functions.SolutionPair.SecondSolutionValue.

static SolutionPair Meta.Numerics.Functions.AdvancedMath.Bessel ( double  nu,
double  x 
)
inlinestatic

Computes both solutions of the Bessel differential equation.

Parameters
nuThe order, which must be non-negative.
xThe argument, which must be non-negative.
Returns
The values of Jnu(x), J'nu(x), Ynu(x), and Y'nu(x).

Bessel functions often occur in physical phenomenon with cylindrical symmetry. They satisfy the differential equation

Since this is second order linear equation, is has two linearly independent solutions. The regular Bessel function J&#x3BD;(x), which is regular at the origin, and the irregular Bessel function Y&#x3BD;(x), which diverges at the origin. Far from the origin, both functions are oscilatory.

This method simultaneously computes both Bessel functions and their derivatives. If you need both J and Y, it is faster to call this method once than to call BesselJ(double,double) and BesselY(double,double) seperately. If on, the other hand, you need only J or only Y, it is faster to call the appropriate method to compute the one you need.

Exceptions
ArgumentOutOfRangeExceptionnu or x is negative.

References Meta.Numerics.Functions.SolutionPair.SecondSolutionDerivative, and Meta.Numerics.Functions.SolutionPair.SecondSolutionValue.

Referenced by Test.AdvancedMathTest.FullBesselDerivative(), Test.AdvancedMathTest.FullBesselRealBesselAgreement(), and Test.AdvancedMathTest.FullBesselWronskian().

static void Meta.Numerics.Functions.AdvancedMath.Bessel_RecurrUpward ( double  nu,
double  x,
ref double  F,
ref double  FP,
int  n 
)
inlinestaticprivate
static SolutionPair Meta.Numerics.Functions.AdvancedMath.Bessel_Steed ( double  nu,
double  x 
)
inlinestaticprivate
static SolutionPair Meta.Numerics.Functions.AdvancedMath.Bessel_Steed ( double  r,
Complex  z,
double  W,
int  sign 
)
inlinestaticprivate
static SolutionPair Meta.Numerics.Functions.AdvancedMath.Bessel_Asymptotic ( double  nu,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ ( int  n,
double  x 
)
inlinestatic

Computes the regular spherical Bessel function of integer order.

Parameters
nThe order parameter.
xThe argument.
Returns
The value of jn(x).

The spherical Bessel functions occur in solutions to the wave equations with spherical symmetry. The regular sperhical Bessel functions are finite at the origin, and thus occur in situations where the wave equation is satisfied at the origin.

The regular spherical Bessel functions are related to the regular Bessel functions of half-integer order by jn(x) = Sqrt(&#x3C0;/2x) Jn+1/2(x).

See also
SphericalBesselY, BesselJ(double,double)

Referenced by Test.AdvancedMathTest.SphericalBesselNegativeOrder(), Test.AdvancedMathTest.SphericalBesselRealBesselAgreement(), Test.AdvancedMathTest.SphericalBesselRecurrence(), Test.AdvancedMathTest.SphericalBesselSpecialCase(), Test.AdvancedMathTest.SphericalBesselTower(), and Test.AdvancedMathTest.SphericalBesselWronskian().

static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselY ( int  n,
double  x 
)
inlinestatic
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ_Zero ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ_SeriesOne ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ_One ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ_Series ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselY_Series ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselY_Zero ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselY_SeriesOne ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselY_One ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.SphericalBesselJ_Miller ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CoulombFactorZero ( double  eta)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CoulombFactor ( int  L,
double  eta 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.CoulombF_Series ( int  L,
double  eta,
double  rho,
out double  F,
out double  FP 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.Coulomb_Zero_Series ( double  eta,
double  rho,
out double  F,
out double  FP,
out double  G,
out double  GP 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Coulomb_CF1 ( double  L,
double  eta,
double  rho,
out int  sign 
)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedMath.Coulomb_CF2 ( double  L,
double  eta,
double  rho 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.Coulomb_Asymptotic ( double  L,
double  eta,
double  rho,
out double  F,
out double  G 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CoulombTurningPoint ( double  L,
double  eta 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CoulombF ( int  L,
double  eta,
double  rho 
)
inlinestatic

Computes the regular Coulomb wave function.

Parameters
LThe angular momentum number, which must be non-negative.
etaThe charge parameter, which can be postive or negative.
rhoThe radial distance parameter, which must be non-negative.
Returns
The value of FL(&#x3B7;,&#x3C1;).

The Coulomb wave functions are the radial wave functions of a non-relativistic particle in a Coulomb potential.

They satisfy the differential equation:

A repulsive potential is represented by &#x3B7; > 0, an attractive potential by &#x3B7; < 0.

F is oscilatory in the region beyond the classical turning point. In the quantum tunneling region inside the classical turning point, F is exponentially supressed.

Many numerical libraries compute Coulomb wave functions in the quantum tunneling region using a WKB approximation, which accurately determine only the first handfull of digits; our library computes Coulomb wave functions even in this computationaly difficult region to nearly full precision – all but the last 3-4 digits can be trusted.

The irregular Coulomb wave functions GL(&#x3B7;,&#x3C1;) are the complementary independent solutions of the same differential equation.

Exceptions
ArgumentOutOfRangeExceptionL or rho is negative.
See also
CoulombG

References Meta.Numerics.Functions.SolutionPair.FirstSolutionValue.

Referenced by Test.AdvancedMathTest.CoulombEtaZeroTest(), Test.AdvancedMathTest.CoulombRecursionTest(), and Test.AdvancedMathTest.CoulombWronskianHelper().

static double Meta.Numerics.Functions.AdvancedMath.CoulombG ( int  L,
double  eta,
double  rho 
)
inlinestatic

Computes the irregular Coulomb wave function.

Parameters
LThe angular momentum number, which must be non-negative.
etaThe charge parameter, which can be postive or negative.
rhoThe radial distance parameter, which must be non-negative.
Returns
The value of GL(&#x3B7;,&#x3C1;).

For information on the Coulomb wave functions, see the remarks on CoulombF.

Exceptions
ArgumentOutOfRangeExceptionL or rho is negative.
See also
CoulombF

References Meta.Numerics.Functions.SolutionPair.SecondSolutionDerivative, and Meta.Numerics.Functions.SolutionPair.SecondSolutionValue.

Referenced by Test.AdvancedMathTest.CoulombEtaZeroTest(), Test.AdvancedMathTest.CoulombRecursionTest(), and Test.AdvancedMathTest.CoulombWronskianHelper().

static void Meta.Numerics.Functions.AdvancedMath.Coulomb_Recurse_Upward ( int  L1,
int  L2,
double  eta,
double  rho,
ref double  U,
ref double  UP 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CoulombF_Integrate ( int  L,
double  eta,
double  rho 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.CarlsonF ( double  x,
double  y,
double  z 
)
inlinestatic

Computes the Carslon elliptic integral RF.

Parameters
xThe first parameter, which must be non-negative.
yThe second parameter, which must be non-negative.
zThe third parameter, which must be non-negative.
Returns
The value of RF(x,y,z).

The Carlson F integral is:

As can be seen from the integral, all three parameters are equivilent, so RF is symmetric with respect to any permutation of the parameters.

The Carlson integrals can be used to express integrals of rational functions. In that sense, they are replacements for the Legendre elliptic functions.

See also
EllipticK, EllipticF

Referenced by Test.AdvancedMathTest.CarlsonDSymmetrizedSum(), Test.AdvancedMathTest.CarlsonFDuplication(), Test.AdvancedMathTest.CarlsonFInequality(), Test.AdvancedMathTest.CarlsonFSpecialCases(), Test.AdvancedMathTest.CarlsonLegendreRelation(), Test.AdvancedMathTest.CarlsonLemniscaticValues(), and Test.AdvancedMathTest.EllipticKCarlsonFRelationship().

static double Meta.Numerics.Functions.AdvancedMath.CarlsonD ( double  x,
double  y,
double  z 
)
inlinestatic

Computes the Carlson integral RD.

Parameters
xThe first parameter, which must be non-negative.
yThe second parameter, which must be non-negative.
zThe third parameter, which must be non-negative.
Returns
The value of RD(x, y, z)

The Carlson D integral is:

It is symmetric with respect to the interchange of the first two parameters, but not the third parameter.

The Carlson integrals can be used to express integrals of rational functions. In that sense, they are replacements for the Legendre elliptic functions.

Referenced by Test.AdvancedMathTest.CarlsonDSymmetrizedSum(), Test.AdvancedMathTest.CarlsonLegendreRelation(), Test.AdvancedMathTest.CarlsonLemniscaticValues(), and Test.AdvancedMathTest.CarslonDSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.EllipticK_Series ( double  k)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.EllipticK_Asymptotic ( double  k1)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Elliptic_AGM ( double  k)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.EllipticK ( double  k)
inlinestatic

Computes the complete elliptic integral of the first kind.

Parameters
kThe elliptic modulus, which must lie between zero and one.
Returns
The value of the Legendre integral K(k).

K(k) is defined as the complete elliptic integral:

It appears in the Legendre reduction of integrals of rational funtions.

Be aware that some authors use the the parameter m = k2 instead of the modulus k.

See also
EllipticF

Referenced by Test.AdvancedMathTest.EllipticKCarlsonFRelationship(), Test.AdvancedMathTest.EllipticKCatalanIntegral(), Test.AdvancedMathTest.EllipticKInequality(), Test.AdvancedMathTest.EllipticKIntegration(), Test.AdvancedMathTest.EllipticKSpecialCases(), Test.AdvancedMathTest.EllipticLandenTransform(), and Test.AdvancedMathTest.EllipticLegendreRelation().

static double Meta.Numerics.Functions.AdvancedMath.EllipticF ( double  phi,
double  k 
)
inlinestatic

Computes the incomplete elliptic integral of the first kind.

Parameters
phiThe integration angle (in radians).
kThe elliptic modulus, which must lie between zero and one.
Returns
The value of the Legendre integral F(k).

Legendre's first incomplete elliptic integral is:

When the integral angle is &#x3C0;, this function reduces to the complete elliptic integral of the first kind (EllipticK.

Be aware that some authors use the the parameter m = k2 instead of the modulus k.

See also
EllipticK

References Meta.Numerics.MoreMath.Cos(), and Meta.Numerics.MoreMath.Sin().

Referenced by Test.AdvancedMathTest.EllipticFBetaRelationship(), Test.AdvancedMathTest.EllipticFIntegral(), Test.AdvancedMathTest.EllipticFIntegration(), and Test.AdvancedMathTest.EllipticFSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.EllipticE_Series ( double  k)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.EllipticE_Asymptotic ( double  k1)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.EllipticE ( double  k)
inlinestatic

Computes the complete elliptic integral of the second kind.

Parameters
kThe elliptic modulus, which must lie between zero and one.
Returns
The value of the Legendre integral E(k).

E(k) is defined as the complete elliptic integral:

It appears in the Legendre reduction of integrals of rational funtions.

The perimeter of an ellipse with major axis a and eccentricity e is 4 a E(e).

Be aware that some authors use the the parameter m = k2 instead of the modulus k.

See also
EllipticE(double,double)

Referenced by Test.AdvancedMathTest.EllipticEIntegration(), Test.AdvancedMathTest.EllipticESPecialCases(), Test.AdvancedMathTest.EllipticLandenTransform(), and Test.AdvancedMathTest.EllipticLegendreRelation().

static double Meta.Numerics.Functions.AdvancedMath.EllipticE ( double  phi,
double  k 
)
inlinestatic

Computes the incomplete elliptic integral of the second kind.

Parameters
phiThe integration angle (in radians).
kThe elliptic modulus, which must lie between zero and one.
Returns
The value of E(phi,k).

The incomplete elliptic integral of the second kind is:

It appears in the Legendre reduction of integrals of rational funtions.

Be aware that some authors use the the parameter m = k2 instead of the modulus k.

See also
EllipticE(double)

References Meta.Numerics.MoreMath.Sin().

static double Meta.Numerics.Functions.AdvancedMath.Erf ( double  x)
inlinestatic

Computes the error function.

Parameters
xThe argument.
Returns
The value of erf(x).

The error can be defined via a Gaussian integral.

The area under a bell curve (Meta.Numerics.Statistics.Distributions.NormalDistribution) within &#x2213;z standard deviations of the mean is given by erf(z/&#x221A;2).

For large values of x, erf(x) &#x2248; 1 to within floating-point accuracy. To obtain accurate values of erfc(x) = 1 - erf(x) in this range, use the Erfc function.

The inverse of the error function is implemented as AdvancedMath.InverseErf.

Values of the error function for complex arguments can be obtained using AdvancedComplexMath.Erf method, or using the equivalent but re-parameterized AdvancedComplexMath.Faddeeva function.

See also
Erfc

Referenced by Test.BugTests.Bug5705(), Test.AdvancedMathTest.ErfIntegralTest(), Test.AdvancedMathTest.ErfNegativeArgumentsTest(), Test.AdvancedMathTest.ErrorFunctionComplementarity(), Test.AdvancedMathTest.ErrorFunctionSpecialCases(), and Test.AdvancedMathTest.InverseErfTest().

static double Meta.Numerics.Functions.AdvancedMath.Erfc ( double  x)
inlinestatic

Computes the complementary error function.

Parameters
xThe argument.
Returns
The value of erfc(x ) = 1 - erf(x ).

The complementary error function can be used to express the area in the tails of a Bell curve beyond a given distance from its center.

It can be defined via an integral:

For small values of x, erfc(x) &#x2248; 1 to within floating-point accuracy. To obtain accurate values of erfc(x) = 1 - erf(x) in this region, use the Erf function.

See also
Erf

Referenced by Test.BugTests.Bug5705(), Test.AdvancedMathTest.ErfcInequality(), Test.AdvancedMathTest.ErfcIntegral(), Test.AdvancedMathTest.ErrorFunctionComplementarity(), Test.AdvancedMathTest.ErrorFunctionSpecialCases(), Meta.Numerics.Functions.AdvancedMath.Gamma_Temme(), Test.AdvancedMathTest.IncompleteGammaErfc(), and Test.AdvancedMathTest.InverseErfTest().

static double Meta.Numerics.Functions.AdvancedMath.Erf_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Erfc_ContinuedFraction ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.InverseErfc ( double  y)
inlinestatic

Computes the inverse complementary error function.

Parameters
yThe value of erfc(x), which must lie between 0 and 1.
Returns
The corresponding argument x.
Exceptions
ArgumentOutOfRangeExceptiony lies outside [0,1].
See also
Erf, Erfc, InverseErf

Referenced by Test.AdvancedMathTest.InverseErfTest(), and Test.AdvancedMathTest.InverseErrofFunctionSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.InverseErf ( double  y)
inlinestatic

Computes the inverse error function.

Parameters
yThe error function value erf(x), which must lie between -1 and 1.
Returns
The corresponding argument x.
Exceptions
ArgumentOutOfRangeExceptiony is outside [-1,1].
See also
Erf, Erfc, InverseErfc

Referenced by Meta.Numerics.UncertainValue.ConfidenceInterval(), Test.AdvancedMathTest.InverseErfIntegralTest(), Test.AdvancedMathTest.InverseErfTest(), Test.AdvancedMathTest.InverseErrofFunctionSpecialCases(), FutureTest.FutureTest.NormalMeanOrderStatisticExpansion(), and FutureTest.FutureTest.NormalMeanOrderStatisticExpansion2().

static double Meta.Numerics.Functions.AdvancedMath.InverseErfSeries ( double  x)
inlinestaticprivate
static double [] Meta.Numerics.Functions.AdvancedMath.ComputeInverseErfSeriesCoefficients ( int  n)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.InverseErfcByRefinement ( double  y)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.InverseErfcAsymptoticExpansion ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.InverseErfcRationalApproximation ( double  x)
inlinestaticprivate
<summary> Computes the Dawson integral.</summary><paramname="x"> The argument.</param><returns> The value of Meta.Numerics.Functions.AdvancedMath.F ( )
inlineprivate
static double Meta.Numerics.Functions.AdvancedMath.Dawson_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Dawson_Asymptotic ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Dawson_Rybicki ( double  x)
inlinestaticprivate
static double [] Meta.Numerics.Functions.AdvancedMath.Compute_Dawson_Rybicki_Coefficients ( double  h,
int  n 
)
inlinestaticprivate
<summary> Computes the Fresnel cosine integral.</summary><paramname="x"> The argument.</param><returns> The value of Meta.Numerics.Functions.AdvancedMath.C ( )
inlineprivate
<summary> Computes the Fresnel sine integral.</summary><paramname="x"> The argument.</param><returns> The value of Meta.Numerics.Functions.AdvancedMath.S ( )
inlineprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralEi_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralEi_Asymptotic ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralEi ( double  x)
inlinestatic

Computes the principal value of the exponential integral.

Parameters
xThe argument, which must be non-negative.
Returns
The value of Ei(x).

The function Ei(x) appears in the evaluation of some indefinite integrals involving exponents and in number theory in the approximation li(x) = Ei(ln x) to the cumulative distribution of primes.

It is related to the real part of the exponential integral for negative arguments by E1(-x &#177; i&#x3B5;) = -Ei(x) &#x2213; i&#x3C0;.

Exceptions
ArgumentOutOfRangeExceptionx is negative.

Referenced by Test.AdvancedComplexMathTest.ComplexEinAgreement(), and Test.RootsTest.RootOfEi().

static double Meta.Numerics.Functions.AdvancedMath.IntegralE ( int  n,
double  x 
)
inlinestatic

Computes the exponential integral.

Parameters
nThe order parameter.
xThe argument, which must be non-negative.
Returns
The value of En(x).

The exponential integral is defined as:

It is related to the incomplete Gamma function for negative, integer shape parameters by &#x393;(-k, x) = Eik+1(x) / xk.

In hydrology, E1(x) is sometimes called the Well function.

Exceptions
ArgumentOutOfRangeExceptionx is negative.

References Meta.Numerics.Functions.AdvancedMath.Gamma(), and Meta.Numerics.MoreMath.Pow().

Referenced by Test.AdvancedComplexMathTest.ComplexEinAgreement(), Test.AdvancedMathTest.IntegralE1Inequality(), Test.AdvancedMathTest.IntegralEIncompleteGamma(), Test.AdvancedMathTest.IntegralEInequality(), Test.AdvancedMathTest.IntegralEIntegral(), Test.AdvancedMathTest.IntegralEInvalidArgumentTest(), Test.AdvancedMathTest.IntegralERecurrence(), and Test.AdvancedMathTest.IntegralESpecialCaseTest().

static double Meta.Numerics.Functions.AdvancedMath.IntegralE_Series ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralE_ContinuedFraction ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralCi ( double  x)
inlinestatic

Computes the cosine integral.

Parameters
xThe argument, which must be non-negative.
Returns
The value of Ci(x).

The cosine integral is defined as:

The cosine integral diverges logrithmically to negative inifity at the origin and executes a damped oscilation arround zero as its argument increases.

Exceptions
ArgumentOutOfRangeExceptionx is negative.

Referenced by Test.AdvancedMathTest.IntegralCiSiIntegrals().

static double Meta.Numerics.Functions.AdvancedMath.IntegralSi ( double  x)
inlinestatic

Computes the sine integral.

Parameters
xThe argument.
Returns
The value of Si(x).

The sine integral is defined as:

The sine integral is zero at the origin and executes a damped oscilation arround &#x3C0;/2 as its argument increases.

Referenced by Test.AdvancedMathTest.IntegralCiSiIntegrals(), Test.AdvancedMathTest.IntegralSiDefinition(), and Test.AdvancedMathTest.SphericalBesselTower().

static double Meta.Numerics.Functions.AdvancedMath.IntegralSi_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralCi_Series ( double  x)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedMath.IntegralE1_Imaginary_ContinuedFraction ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralTi ( double  x)
inlinestatic

Computes the inverse tangent integral.

Parameters
xThe argument.
Returns
The value of Ti2(x).

Referenced by Test.AdvancedMathTest.IntegralTiDefinition().

static double Meta.Numerics.Functions.AdvancedMath.IntegralTi_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.IntegralTi_LogSeries ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.LogGamma ( double  x)
inlinestatic

Computes the natural logrithm of the Gamma function.

Parameters
xThe argument, which must be positive.
Returns
The log Gamma function ln(&#x393;(x)).

Because &#x393;(x) grows rapidly for increasing positive x, it is often necessary to work with its logarithm in order to avoid overflow. This function returns accurate values of ln(&#x393;(x)) even for values of x which would cause &#x393;(x) to overflow.

Exceptions
ArgumentOutOfRangeExceptionx is negative or zero.
See also
Gamma(double)

Referenced by Meta.Numerics.Functions.AdvancedMath.BesselJ_Series(), Test.AdvancedMathTest.BesselYInRange(), Test.AdvancedComplexMathTest.ComplexLogGammaAgreement(), Meta.Numerics.Statistics.Distributions.GammaDistribution.GammaDistribution(), Test.AdvancedMathTest.GammaRatioInequality(), Test.AdvancedMathTest.IntegerBesselWronskian(), Meta.Numerics.Functions.AdvancedIntegerMath.LogDoubleFactorial_Gamma(), Meta.Numerics.Functions.AdvancedIntegerMath.LogFactorial(), Test.AdvancedMathTest.LogGammaDuplication(), Test.AdvancedMathTest.LogGammaNegativeArgument(), Test.AdvancedMathTest.LogGammaTriplication(), Meta.Numerics.Functions.AdvancedMath.ModifiedBesselI_Series(), and Meta.Numerics.Statistics.Distributions.ChiSquaredDistribution.Moment().

static double Meta.Numerics.Functions.AdvancedMath.Gamma ( double  x)
inlinestatic

Computes the Gamma function.

Parameters
xThe argument.
Returns
The value of &#x393;(x).

The Gamma function is a generalization of the factorial (see AdvancedIntegerMath.Factorial) to arbitrary real values.

For positive integer arguments, this integral evaluates to &#x393;(n+1)=n!, but it can also be evaluated for non-integer z.

Because &#x393;(x) grows beyond the largest value that can be represented by a System.Double at quite moderate values of x, you may find it useful to work with the LogGamma method, which returns ln(&#x393;(x)).

To evaluate the Gamma function for a complex argument, use AdvancedComplexMath.Gamma.

Domain, Range, and Accuracy

The function is defined for all x. It has poles at all negative integers and at zero; the method returns Double.NaN for these arguments. For positive arguments, the value of the function increases rapidly with increasing argument. For values of x greater than about 170, the value of the function exceeds Double.MaxValue; for these arguments the method returns Double.PositiveInfinity. The method is accurate to full precision over its entire domain.

See also
AdvancedIntegerMath.Factorial, LogGamma, AdvancedComplexMath.Gamma

DLMF on the Gamma Function

Referenced by Meta.Numerics.Functions.AdvancedMath.Airy_Series(), Meta.Numerics.Functions.AdvancedMath.AiryAi_Series(), Meta.Numerics.Functions.AdvancedMath.AiryBi_Series(), Test.AdvancedMathTest.AiryZeroArgument(), Test.OrthogonalPolynomialsTest.AssociatedLaguerreOrthonormality(), Test.MultiIntegrateTest.BallVolumeIntegrals(), Meta.Numerics.Functions.AdvancedMath.BesselJ_Series(), Test.AdvancedMathTest.CarlsonLemniscaticValues(), Test.AdvancedComplexMathTest.ComplexGammaInequality(), Test.AdvancedMathTest.EllipticESPecialCases(), Test.AdvancedMathTest.EllipticKSpecialCases(), Meta.Numerics.Functions.AdvancedIntegerMath.Factorial(), Test.ExtremaTest.FindMinimumOfGamma(), Meta.Numerics.Statistics.Distributions.GammaDistribution.GammaDistribution(), Test.AdvancedMathTest.GammaInequality(), Test.AdvancedMathTest.GammaIntegral(), Test.AdvancedMathTest.GammaRecurrsion(), Test.AdvancedMathTest.GammaReflection(), Test.AdvancedMathTest.GammaSpecialCases(), Test.AdvancedMathTest.GammaTrottIdentity(), FutureTest.FutureTest.GammaWithDerivative(), Test.AdvancedMathTest.IncompleteGammaErfc(), Test.AdvancedMathTest.IncompleteGammaExp(), Test.AdvancedMathTest.IncompleteGammaInequality(), Meta.Numerics.Functions.AdvancedMath.IntegralE(), Test.AdvancedMathTest.IntegralEIncompleteGamma(), Meta.Numerics.Functions.AdvancedMath.ModifiedBesselI_Series(), Meta.Numerics.Statistics.Distributions.WeibullDistribution.Moment(), Meta.Numerics.Statistics.Distributions.KolmogorovDistribution.Moment(), Meta.Numerics.Statistics.Distributions.KuiperDistribution.Moment(), Test.MultiIntegrateTest.RambleIntegrals(), Test.AdvancedMathTest.RealBesselJIntegral(), Test.AdvancedMathTest.RegularizedIncompleteGammaRecurrence(), Meta.Numerics.Functions.AdvancedMath.RiemannZeta(), Test.AdvancedMathTest.RiemannZetaReflectionTest(), FutureTest.FutureTest.TestGammaValues(), FutureTest.FutureTest.TestMinimizationWithoutDerivative(), and Test.MultiIntegrateTest.WatsonIntegrals().

static double Meta.Numerics.Functions.AdvancedMath.Psi ( int  n,
double  x 
)
inlinestatic

Computes the polygamma function.

Parameters
nThe order, which must be non-negative.
xThe argument.
Returns
The value of &#968;n(x).

The polygamma function gives higher logarithmic derivatives of the Gamma function.

Exceptions
ArgumentOutOfRangeExceptionn is negative.

References Meta.Numerics.Functions.AdvancedIntegerMath.Factorial(), and Meta.Numerics.MoreMath.Pow().

static double [] Meta.Numerics.Functions.AdvancedMath.ComputeCotDerivative ( int  n)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.EvaluateCotDerivative ( double[]  p,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.LogBeta ( double  a,
double  b 
)
inlinestatic

Computes the lograrithm of the Beta function.

Parameters
aThe first parameter, which must be positive.
bThe second parameter, which must be positive.
Returns
The value of ln(B(a,b)).

This function accurately computes ln(B(a,b)) even for values of a and b for which B(a,b) is too small or large to be represented by a double.

Exceptions
ArgumentOutOfRangeExceptiona or b is non-positive.
See also
Beta(System.Double,System.Double)
static double Meta.Numerics.Functions.AdvancedMath.LeftRegularizedGamma ( double  a,
double  x 
)
inlinestatic

Computes the normalized lower (left) incomplete Gamma function.

Parameters
aThe shape parameter, which must be positive.
xThe argument, which must be non-negative.
Returns
The value of &#x3B3;(a,x)/&#x393;(x).

The incomplete Gamma function is obtained by carrying out the Gamma function integration from zero to some finite value x, instead of to infinity. The function is normalized by dividing by the complete integral, so the function ranges from 0 to 1 as x ranges from 0 to infinity.

For large values of x, this function becomes 1 within floating point precision. To determine its deviation from 1 in this region, use the complementary function RightRegularizedGamma.

For a=&#x3BD;/2 and x=&#x3C7;2/2, this function is the CDF of the &#x3C7;2 distribution with &#x3BD; degrees of freedom.

Exceptions
ArgumentOutOfRangeExceptiona is negative or zero.
ArgumentOutOfRangeExceptionx is negative.
See also
RightRegularizedGamma

Referenced by Meta.Numerics.Statistics.Distributions.GammaDistribution.InverseLeftStandardGamma(), Meta.Numerics.Statistics.Distributions.GammaDistribution.LeftProbability(), Test.AdvancedMathTest.RegularizedIncompleteGammaRecurrence(), Test.AdvancedMathTest.RegularizedIncompleteGammaUnitarity(), and Meta.Numerics.Statistics.Distributions.PoissonDistribution.RightExclusiveProbability().

static double Meta.Numerics.Functions.AdvancedMath.RightRegularizedGamma ( double  a,
double  x 
)
inlinestatic

Computes the normalized upper (right) incomplete Gamma function.

Parameters
aThe shape paraemter, which must be positive.
xThe argument, which must be non-negative.
Returns
The value of &#x393;(a,x)/&#x393;(x).

This function is the complement of the left incomplete Gamma function LeftRegularizedGamma.

Exceptions
ArgumentOutOfRangeExceptiona is negative or zero.
ArgumentOutOfRangeExceptionx is negative.
See also
LeftRegularizedGamma

Referenced by Test.AdvancedMathTest.IncompleteGammaIntegerInequality(), Meta.Numerics.Statistics.Distributions.PoissonDistribution.LeftInclusiveProbability(), Test.AdvancedMathTest.RegularizedIncompleteGammaExponential(), Test.AdvancedMathTest.RegularizedIncompleteGammaUnitarity(), and Meta.Numerics.Statistics.Distributions.GammaDistribution.RightProbability().

static double Meta.Numerics.Functions.AdvancedMath.Gamma ( double  a,
double  x 
)
inlinestatic

Computes the upper incomplete Gamma function.

Parameters
aThe shape parameter, which must be positive.
xThe argument, which must be non-negative.
Returns
The value of &#x393;(a,x).

The incomplete Gamma function is defined by the same integrand as the Gamma function (Gamma(double)), but the integral is not taken over the full positive real axis.

Like the &#x393; function itself, this function gets large very quickly. For most purposes, you will prefer to use the regularized incomplete gamma functions LeftRegularizedGamma and RightRegularizedGamma.

See also
Gamma(double)
static double Meta.Numerics.Functions.AdvancedMath.Beta ( double  a,
double  b,
double  x 
)
inlinestatic

Computes the incomplete Beta function.

Parameters
aThe left shape parameter, which must be non-negative.
bThe right shape paraemter, which must be non-negative.
xThe integral endpoint, which must lie in [0,1].
Returns
The value of Bx(a, b).
static double Meta.Numerics.Functions.AdvancedMath.LeftRegularizedBeta ( double  a,
double  b,
double  x 
)
inlinestatic
static double Meta.Numerics.Functions.AdvancedMath.PowOverBeta ( double  a,
double  b,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.GammaP_Series ( double  a,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.GammaQ_ContinuedFraction ( double  a,
double  x 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.Gamma_Temme ( double  a,
double  x,
out double  P,
out double  Q 
)
inlinestaticprivate
static Complex Meta.Numerics.Functions.AdvancedMath.SphericalHarmonic ( int  l,
int  m,
double  theta,
double  phi 
)
inlinestatic

Computes the value of a spherical harmonic function.

Parameters
lThe order, which must be non-negative.
mThe sub-order, which must lie between -l and l inclusive.
thetaThe azimuthal angle &#x3B8;. This angle is usually expressed as between -&#x3C0;/2 and +&#x3C0;/2, with positive values representing the upper hemisphere and negative values representing the lower hemisphere.
phiThe cylindrical angle &#x3C6;. This angle is usually expressed as between 0 and 2&#x3C0;, measured counter-clockwise (as seen from above) from the positive x-axis. It is also possible to use negative values to represent clockwise movement.
Returns
The value of Yl,m(&#x3B8;,&#x3C6;).
Exceptions
ArgumentOutOfRangeExceptionl is negative, or m lies outside the range [-l, l].

References Meta.Numerics.Complex.Conjugate, Meta.Numerics.MoreMath.Cos(), and Meta.Numerics.MoreMath.Sin().

Referenced by Test.OrthogonalPolynomialsTest.SphericalHarmonicAddition(), Test.OrthogonalPolynomialsTest.SphericalHarmonicConjugation(), Test.OrthogonalPolynomialsTest.SphericalHarmonicLegendre(), Test.OrthogonalPolynomialsTest.SphericalHarmonicLowOrders(), Test.OrthogonalPolynomialsTest.SphericalHarmonicNormalization(), and Test.OrthogonalPolynomialsTest.SphericalHarmonicSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.LambertW ( double  x)
inlinestatic

Computes the Lambert W function.

Parameters
xThe argument, which must be greater than or equal to -1/e.
Returns
The value W(x).

The Lambert W function solves the transcendental equation W eW = x. The function appears in a number of contexts, including the solution of differential equations and the enumeration of trees.

Referenced by Test.AdvancedMathTest.LambertSpecialCaseTest(), and Test.AdvancedMathTest.LambertTest().

static double Meta.Numerics.Functions.AdvancedMath.Lambert_Halley ( double  x,
double  w0 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Lambert_SeriesZero ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Lambert_SeriesSmall ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Lambert_SeriesLarge ( double  x)
inlinestaticprivate
static SolutionPair Meta.Numerics.Functions.AdvancedMath.ModifiedBessel ( double  nu,
double  x 
)
inlinestatic

Computes modified cylindrical Bessel functions.

Parameters
nuThe order, which must be non-negative.
xThe argument, which must be non-negative.
Returns
The values of I, I', K, and K' for the given order and argument.

The modified bessel functions fufill a differential equation similiar to the bessel differential equation.

Referenced by Test.AdvancedMathTest.FullModifiedBesselDerivitive(), Test.AdvancedMathTest.ModifiedBesselAgreement(), and Test.AdvancedMathTest.ModifiedBesselWronskian().

static void Meta.Numerics.Functions.AdvancedMath.ModifiedBesselK_RecurrUpward ( double  mu,
double  x,
ref double  K,
ref double  KP,
int  n 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.ModifiedBesselI ( double  nu,
double  x 
)
inlinestatic

Computes the regular modified cynlindrical Bessel function.

Parameters
nuThe order parameter.
xThe argument, which must be non-negative.
Returns
The value of I&#x3BD;(x).

The modified Bessel functions appear as the solutions of hyperbolic differential equations with cylindrical or circular symmetry, for example the conduction of heat through a cylindrical pipe.

The regular modified Bessel functions are related to the Bessel fuctions with pure imaginary arguments.

The regular modified Bessel functions increase monotonically and exponentially from the origin.

See also
ModifiedBesselK

Referenced by Test.AdvancedMathTest.BesselModifiedBesselRelationship(), Test.AdvancedMathTest.ModifiedBesselAgreement(), Test.AdvancedMathTest.ModifiedBesselArgumentZeroTest(), Test.AdvancedMathTest.ModifiedBesselHalfIntegerOrderTest(), Test.AdvancedMathTest.ModifiedBesselIntegralTest(), Test.AdvancedMathTest.ModifiedBesselTower(), and Test.AdvancedMathTest.ModifiedBesselWronskianTest().

static double Meta.Numerics.Functions.AdvancedMath.ModifiedBesselK ( double  nu,
double  x 
)
inlinestatic

Computes the irregular modified cynlindrical Bessel function.

Parameters
nuThe order parameter.
xThe argument.
Returns
The value of K&#x3BD;(x).

The modified Bessel functions are related to the Bessel fuctions with pure imaginary arguments.

The irregular modified Bessel function decreases monotonically and exponentially from the origin.

Referenced by Test.AdvancedMathTest.ModifiedBesselAgreement(), Test.AdvancedMathTest.ModifiedBesselArgumentZeroTest(), Test.AdvancedMathTest.ModifiedBesselHalfIntegerOrderTest(), and Test.AdvancedMathTest.ModifiedBesselWronskianTest().

static void Meta.Numerics.Functions.AdvancedMath.ModifiedBesselI_Series ( double  nu,
double  x,
out double  I,
out double  IP 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.ModifiedBesselI_Series ( double  nu,
double  x 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.ModifiedBessel_Asymptotic ( double  nu,
double  x,
out double  sI,
out double  sIP,
out double  sK,
out double  sKP 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.ModifiedBessel_CF1 ( double  nu,
double  x 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.ModifiedBessel_CF_K ( double  nu,
double  x,
out double  K,
out double  g 
)
inlinestaticprivate
static void Meta.Numerics.Functions.AdvancedMath.ModifiedBesselK_Series ( double  nu,
double  x,
out double  K0,
out double  K1 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.AiryAi ( double  x)
inlinestatic

Computes the Airy function of the first kind.

Parameters
xThe argument.
Returns
The value Ai(x).

Airy functions are solutions to the Airy differential equation:

The Airy functions appear in quantum mechanics in the semiclassical WKB solution to the wave functions in a potential.

For negative arguments, Ai(x) is oscilatory. For positive arguments, it decreases exponentially with increasing x.

See also
AiryBi

References Meta.Numerics.Functions.SolutionPair.FirstSolutionValue, and Meta.Numerics.Functions.SolutionPair.SecondSolutionValue.

Referenced by Test.AdvancedMathTest.AiryBairyIntegral(), Test.AdvancedMathTest.AiryIntegral(), Test.AdvancedMathTest.AiryIntegrals(), FutureTest.FutureTest.AiryTest(), and Test.AdvancedMathTest.AiryZeroArgument().

static double Meta.Numerics.Functions.AdvancedMath.AiryAi_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.AiryBi ( double  x)
inlinestatic

Computes the Airy function of the second kind.

Parameters
xThe argument.
Returns
The value Bi(x).

The Airy functions appear in quantum mechanics in the semiclassical WKB solution to the wave functions in a potential.

For negative arguments, Bi(x) is oscilatory. For positive arguments, it increases exponentially with increasing x.

While the notation Bi(x) was chosen simply as a natural complement to Ai(x), it has influenced the common nomenclature for this function, which is now often called the "Bairy function".

See also
AiryAi

References Meta.Numerics.Functions.SolutionPair.FirstSolutionValue, and Meta.Numerics.Functions.SolutionPair.SecondSolutionValue.

Referenced by Test.AdvancedMathTest.AiryBairyIntegral(), and Test.AdvancedMathTest.AiryZeroArgument().

static double Meta.Numerics.Functions.AdvancedMath.AiryBi_Series ( double  x)
inlinestaticprivate
static SolutionPair Meta.Numerics.Functions.AdvancedMath.Airy_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.DiLog ( double  x)
inlinestatic

Computes the dilogarathm function, also called Spence's function.

Parameters
xThe argument, which must be less than or equal to unity.
Returns
The value Li2(x).

The dilogarithm can be defined by an infinite sum.

The function gets is name from the similiarity of this series to the expansion of ln(1-x), the difference being that the integer in the denominator is raised to the second power.

Li2(x) is real for -&#x221E; < x &#x2264; 1; for values outside this range, use the complex version AdvancedComplexMath.DiLog.

See also
AdvancedComplexMath.DiLog

Referenced by Test.AdvancedComplexMathTest.ComplexDiLogAgreement(), Test.AdvancedMathTest.DiLogBailyIdentity(), Test.AdvancedMathTest.DiLogDuplication(), Test.AdvancedMathTest.DiLogExpIntegral(), Test.AdvancedMathTest.DiLogLogIntegral(), and Test.AdvancedMathTest.DiLogSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.DiLog_Series ( double  x)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.PolyLog ( int  n,
double  x 
)
inlinestatic

Computes the polylogarithm function.

Parameters
nThe order, which must be non-negative.
xThe argument, which must be less than or equal to one.
Returns
The value of Lin(x).

The polylogarithm function becomes complex for arguments larger than one.

References Meta.Numerics.MoreMath.LogOnePlus(), and Meta.Numerics.MoreMath.Pow().

Referenced by Test.AdvancedMathTest.PolyLogDuplication(), Test.AdvancedMathTest.PolyLogIntegration(), Test.AdvancedMathTest.PolyLogOneHalf(), Test.AdvancedMathTest.PolyLogSpecialCases(), Test.AdvancedMathTest.TriLogBaileyLadders(), and Test.AdvancedMathTest.TriLogSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.PolyLog_BernoulliSum ( int  n,
double  w 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.PolyLog_Series ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.PolyLog_LogSeries ( int  n,
double  x 
)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.Clausen ( double  t)
inlinestatic
static double Meta.Numerics.Functions.AdvancedMath.ClausenNearZero ( double  t)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.ClausenNearPi ( double  t)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.DirichletEta ( double  x)
inlinestatic

Computes the Dirichlet eta function.

Parameters
xThe argument, which must be non-negative.
Returns
The value of &#x3B7;(s).

The Dirichlet eta function is the sum of the x th inverse power of the natural numbers, with alternating signs.

Because these are just the terms of the Riemann zeta function (RiemannZeta) with alternating signs, it is also called the alternating zeta function.

It can be related to the Riemann &#x3B6; function.

Exceptions
ArgumentOutOfRangeExceptionx is negative.
See also
RiemannZeta

Referenced by Test.AdvancedMathTest.DirichletEtaSpecialCaseTest(), Meta.Numerics.Statistics.Distributions.KolmogorovDistribution.Moment(), Meta.Numerics.Statistics.Distributions.LogisticDistribution.MomentAboutMean(), and Test.AdvancedMathTest.PolyLogSpecialCases().

static double Meta.Numerics.Functions.AdvancedMath.DirichletEta_Borwein ( double  x)
inlinestaticprivate
static double [] Meta.Numerics.Functions.AdvancedMath.ComputeBorweinEtaCoefficients ( int  n)
inlinestaticprivate
static double Meta.Numerics.Functions.AdvancedMath.RiemannZeta_LaurentSeries ( double  x)
inlinestaticprivate

Member Data Documentation

readonly decimal Meta.Numerics.Functions.AdvancedMath.dPI2 = 2.0m * 3.1415926535897932384626433832795m
staticprivate
readonly double Meta.Numerics.Functions.AdvancedMath.dmax = Convert.ToDouble(Decimal.MaxValue)
staticprivate
readonly double Meta.Numerics.Functions.AdvancedMath.c4 = Math.Pow(2.0, 2.0 / 3.0)
staticprivate
readonly double Meta.Numerics.Functions.AdvancedMath.SqrtAccuracy = Math.Sqrt(Global.Accuracy)
staticprivate
readonly double [] Meta.Numerics.Functions.AdvancedMath.inverfSeriesCoefficients = ComputeInverseErfSeriesCoefficients(24)
staticprivate
const double Meta.Numerics.Functions.AdvancedMath.Dawson_Rybicki_h = 0.25
private
readonly double [] Meta.Numerics.Functions.AdvancedMath.Dawson_Rybicki_coefficients = Compute_Dawson_Rybicki_Coefficients(0.25, 16)
staticprivate
readonly double [][] Meta.Numerics.Functions.AdvancedMath.TemmeD
staticprivate
Initial value:
= new double[][] {
new double[] { - 1.0 / 3.0, 1.0 / 12.0, - 1.0 / 1080.0, - 19.0 / 12960.0, 1.0 / 181440.0, 47.0 / 1360800.0,
1.0 / 32659200.0, - 221.0 / 261273600.0, - 281.0 / 155196518400.0, 857.0 / 40739086080.0, 1553.0 / 40351094784000.0 },
new double[] { -1.0 / 540.0, - 1.0 / 288.0, 25.0 / 12096.0, - 223.0 / 1088640.0, - 89.0 / 1088640.0,
757.0 / 52254720.0, 445331.0 / 155196518400.0, - 1482119.0 / 2172751257600.0, - 7921307.0 / 84737299046400.0 },
new double[] { 25.0 / 6048.0, - 139.0 / 51840.0, 101.0 / 311040.0, 1379.0 / 7464960.0, - 384239.0 / 7390310400.0,
- 1007803.0 / 155196518400.0, 88738171.0 / 24210656870400.0, 48997651.0 / 484213137408000.0 },
new double[] { 101.0 / 155520.0, 571.0 / 2488320.0, - 3184811.0 / 7390310400.0, 36532751.0 / 310393036800.0,
10084279.0 / 504388684800.0, - 82273493.0 / 5977939968000.0 },
new double[] { - 3184811.0 / 3695155200.0, 163879.0 / 209018880.0, - 2745493.0 / 16303472640.0,
- 232938227.0 / 2934625075200.0, 256276123.0 / 5869250150400.0 },
new double[] { - 2745493.0 / 8151736320.0, - 5246819.0 / 75246796800.0, 119937661.0 / 451480780800.0,
- 294828209.0 / 2708884684800.0 },
new double[] { 119937661.0 / 225740390400.0, - 534703531.0 / 902961561600.0 },
new double[] { 8325705316049.0 / 24176795811840000.0 , 4483131259.0 / 86684309913600.0 }
}
const double Meta.Numerics.Functions.AdvancedMath.EI = 1.0 / Math.E
private
readonly double [] Meta.Numerics.Functions.AdvancedMath.DirichletEta_BorweinCoefficients = ComputeBorweinEtaCoefficients(16)
staticprivate

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