Skip to main content
Ctrl+K

XlCalcNet Documentation

  • Preface

Getting started

  • Setup and general usage
    • Setting up XlCalcNet
    • General and user interface functions
    • Calling Python from C#
    • Using XlCalcNet with spreadsheet formulas
    • Mathematical functions based on Mpmath, Gmpy2 and Python-Flint (only Python)
    • Mathematical functions in fixed precision
    • Mathematical functions based on XlCalcNet2
    • A quick look at Numpy
    • A quick look at Matplotlib and related libraries
    • A quick look at Pandas and Xlxswriter
    • A quick look at Scipy
    • A quick look at R, RStudio and Rpy2
  • Basic floating point functions
    • Operator overloading, general real functions
    • Machine constants, general
    • Properties of numbers
    • Integer related functions
    • Floating point functions for real numbers
    • Fraction and remainder related functions
    • Functions related to mantissa width and exponent range
    • Mathematical Constants
  • Elementary scalar functions (real and complex)
    • Complex components
    • Roots and quadratic, cubic, and quartic equations
    • Exponential and related functions
    • Logarithms and related functions
    • Power functions
    • Trigonometric functions, in radians
    • Trigonometric functions, in multiples of \(\pi\)
    • Hyperbolic functions
    • Inverse trigonometric functions, in radians
    • Inverse hyperbolic functions
    • Factorials, Gamma and related functions
    • Miscellaneous functions
  • Statistical Distributions
    • Introduction to random variables and distributions
    • Base class for univariate distributions
    • Base class for continuous univariate distributions
    • Base class for discrete univariate distributions
    • Closed form distributions, based on elementary functions
      • Boost: Arcsine Distribution
      • Boost: Cauchy distribution
      • Boost: Exponential distribution
      • Boost: Gumbel (Generalized Extreme Value distribution Type-I) distribution
      • Boost: Hyperexponential Distribution
      • !!!Boost: Kumaraswamy distribution
      • Boost: Laplace distribution
      • Boost: Logistic distribution
      • Boost: Pareto distribution
      • Boost: Rayleigh distribution
      • Boost: Triangular Distribution
      • Boost: Uniform distribution
      • Boost: Weibull (Minimum-Type-III) distribution
      • Dagum (Burr Type III) distribution
      • Fisk (log-logistic) distribution
      • Fréchet (Maximum/Minimum-Type-II or Inverse Weibull) distribution
      • Generalized Extreme Value (Maximum) or GEV distribution
      • Generalized Pareto distribution
      • Gompertz-Makeham distribution
      • Lomax distribution
      • Shifted Gompertz distribution
      • Singh-Maddala (Burr Type XII) distribution
    • Closed form distributions, based on the error function
      • !!!Boost: Lévy distribution
      • Boost: Lognormal (Johnson \(S_L\)) distribution
      • !!!Boost: Moyal Distribution
      • Boost: Normal (Johnson \(S_N\)) distribution
      • Boost: Skew normal Distribution
      • Boost: Wald (or Inverse Gaussian) distribution
      • Birnbaum-Saunders Distribution
      • Exponentially Modified Gaussian (EMG) distribution
      • Folded normal distribution
      • Half-normal distribution
      • Johnson \(S_B\) distribution
      • Johnson \(S_U\) distribution
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = 0\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = 0\)
      • Sinh-arcsinh normal distribution
      • Truncated normal distribution
    • Closed form distributions, based on the incomplete gamma function
      • !!!Boost: Chi Distribution
      • Boost: Chi-Squared distribution
      • Boost: Gamma (Pearson Type III, Erlang) distribution
      • Boost: Inverse chisquared distribution
      • Boost: Inverse Gamma (Pearson Type V) distribution
      • !!!Boost: Maxwell Distribution
      • !!!Boost: Nakagami distribution
      • Amoroso distribution
      • Distribution of the logarithm of a \(\chi^2\) random variable
      • Hypoexponential (Generalized Erlang) Distribution
      • Lindley distribution (generalized)
      • Skew exponential power distribution
      • Stacy (generalized gamma) distribution
    • Closed form distributions, based on the incomplete beta function
      • Boost: Beta (Pearson Type I and II) distribution
      • Boost: Central Fisher F distribution
      • Boost: Student \(t\) (Pearson Type VII) distribution
      • Distribution of the negative logarithm of a beta variable
      • Beta-prime (Pearson Type VI) distribution
      • Generalized Beta (Type 1) distribution
      • Generalized Beta (Type 2) distribution
      • Generalized logistic distribution (JKB Types I - IV)
      • Generalized beta-exponential distribution
      • Feller-Pareto distribution
      • Fisher \(z\) distribution
      • Skew t-distribution (Jones)
      • Pearson’s rho distribution (under \(H_0\))
    • Noncentral distributions
      • Boost: Noncentral \(\chi^2\) distribution
      • Boost: Noncentral Student \(t\) distribution
      • Boost: Noncentral Fisher \(F\) distribution
      • Boost: Noncentral Beta Type I distribution
      • Noncentral Chi distribution
      • Rice (Nakagami-n) distribution
      • Noncentral distribution of the sample correlation coefficient
      • Distribution of the logarithm of a noncentral Beta Type II variable
      • Noncentral distribution (Type I) of Fisher’s \(R^2\)
      • Distribution of the logarithm of a noncentral Fisher \(1-R^2\) variable
      • Doubly non-central Student \(t\) distribution
      • Doubly non-central Fisher \(F\) distribution
    • Distributions related to multiple comparisons of means
      • Overview and literature
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = \rho\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = \rho\)
      • Normal maximum distribution, \(\rho_{ij, i \ne j} = \lambda_i \lambda_j\)
      • Normal maximum modulus distribution, \(\rho_{ij, i \ne j} = \lambda_i \lambda_j\)
      • Normal range distribution
      • Studentized maximum distribution
      • Studentized maximum modulus distribution
      • Distribution of Dunnett’s \(t\), one-sided
      • Distribution of Dunnett’s \(t\), two-sided
      • Nair’s \(t\)-distribution
      • Halperin’s \(t\)-distribution
      • Nelson’s \(h\)-distribution
      • Studentized range distribution
    • Distributions related to multivariate statistical analysis
      • Distribution of the sum of the negative logarithms of independent beta variables
      • Distribution of the product of independent beta variables
      • Distribution of Wilks’ \(\Lambda\)
      • Distribution of Wilks’ \(L_{vc}\)
      • Distribution of Wilks’ \(L_{vcm}\)
      • Distribution of Wilks’ test of independence of \(p\) variates
      • Distribution of Wilks’ test of independence of \(k\) groups of variates
      • Distribution of Mauchly’s test of sphericity vs general structure
      • Distribution of Box’s test of equality of covariance matrices, equal sample sizes
      • Distribution of Box’s test of equality of k covariance matrices, unequal sample sizes
      • Distribution of Box’s test for same multivariate normal distributions, unequal sample sizes
      • Distribution of the modified likelihood ratio test (LRT) for a given covariance matrix
      • Distribution of the modified likelihood ratio test (LRT) for a given covariance matrix and mean vector
      • Central distribution of Roy’s largest root
      • Central distribution of Pillai’s \(V\)
      • Central distribution of Hotelling’s \(T^2\)
      • Noncentral Distribution of Wilks’ \(\Lambda\): MANOVA
      • Noncentral Distribution of Wilks’ \(\Lambda\): Canonical Correlation
    • Miscellaneous continuous distributions
      • Boost: Kolmogorov-Smirnov distribution (limiting form)
      • Boost: Landau Distribution
      • Boost: Holtsmark distribution
      • Boost: Map-Airy distribution
      • Boost: Saspoint5 distribution
      • Lévy alpha-stable distribution
      • Pearson Type IV distribution
      • Meixner distribution
      • Voigt Profile Distribution
      • Wrapped Cauchy distribution
      • Wrapped normal distribution
      • Von Mises distribution
      • Generalized inverse Gaussian distribution
      • Harmonic distribution
      • Halphen A distribution
      • Halphen B distribution
      • Halphen IB distribution
      • Generalized hyperbolic distribution
      • Hyperbolic distribution
      • Variance-gamma distribution
    • Elementary discrete (lattice) distributions
      • Boost: Bernoulli distribution
      • Boost: Geometric distribution
      • Boost: Poisson distribution
      • Boost: Binomial distribution
      • Boost: Negative binomial distribution
      • Boost: Classical hypergeometric distribution
      • Log-series distribution
      • Zeta distribution
      • Skellam distribution
      • Delaporte distribution
      • Beta-Poisson distribution (Quinkert)
      • Beta-binomial distribution
      • Beta-negative binomial distribution (Waring)
      • Negative hypergeometric distribution
      • Pólya-Eggenberger distribution
      • General hypergeometric distribution
      • Noncentral hypergeometric distribution, Fisher alternatives
    • Discrete (lattice) distributions related to (stratified) rank tests
      • Wilcoxon signed rank T distribution, continuous data
      • Noncentral Wilcoxon signed rank T distribution, Bennett alternatives
      • Mann-Whitney U distribution, continuous data
      • Noncentral Mann-Whitney U distribution, Lehmann alternatives
      • Noncentral Mann-Whitney U distribution, Milton alternatives
      • Kendall’s tau distribution, continuous data
      • Jonckheere-Terpsta \(T\) distribution, continuous data
      • Generalized Page \(L\) distribution, continuous data
      • Noncentral generalized Page \(L\) distribution, Milton alternatives
    • Discrete (non-lattice) distributions related to rank tests
      • Cochran-Friedman-Quade distribution
      • Kruskal-Wallis distribution
  • Numerical calculus
    • Introduction
    • DAMath: Numerical Rootfinding and Minimization
    • Boost/Math: Root Finding and Minimization Algorithms
    • Mpmath: Rootfinding and optimization
    • DAMath: Numerical Quadrature
    • Boost/Math: Numerical integration
    • Mpmath: Numerical integration
    • Mpmath: Numerical inverse Laplace transform
    • Boost/Odeint: Ordinary differential equations
    • Mpmath: Numerical differentiation
    • Mpmath: Asymptotic expansions
    • Mpmath: Function approximation
    • Mpmath: Sums, products, limits and extrapolation
    • Mpmath: Number identification
    • Mpmath: Polynomials
    • Eigen: Polynomials
    • Eigen/MinPack: non linear optimization
    • Eigen/CppOptLib: multidimensional optimization
    • Flint/Functions for polynomials
    • Flint/Power series and Taylor arithmetic
    • Flint/Verified numerical differentiation
    • Flint/Verified numerical integration
  • Eigen: Dense and Sparse Matrices
    • Creating scalars and matrices
    • Read-only properties: information about a matrix
    • Accessing and setting parts of a matrix
    • Changing the shape of a matrix and/or the order of coefficients
    • Basic arithmetic operations
    • Descriptive Statistics
    • Standard decompositions and linear solving
    • Singular Value and Eigen (selfadjoint) decompositions
    • Eigen decompositions of general square matrices
    • Eigen: Functions of matrix argument
    • Eigen: Fast Fourier Transform
  • Numpy: use with multiprecision data types
    • Numpy array creation from shape or value
    • Numpy array creation from existing data
    • Building special arrays for numerical work
    • Numpy indexing
    • Numpy basic array manipulation routines
    • Numpy array manipulation: Transpose-like operations
    • Numpy array manipulation: Changing number of dimensions
    • Numpy array manipulation: Joining arrays
    • Numpy array manipulation: Splitting and tiling arrays
    • Numpy array manipulation: Adding and removing elements
    • Numpy array manipulation: Rearranging elements
    • Numpy array manipulation: Sorting
    • Numpy array manipulation: Searching
    • Numpy mathematical functions: Sums, products, differences
    • Numpy mathematical functions: Extrema Finding
    • Numpy mathematical functions: Arithmetic operations, elementwise
    • Numpy mathematical functions: Averages and variances
    • Numpy mathematical functions: Matrix and vector products
    • Numpy logical functions: Truth value testing
    • Numpy mathematical functions: Integer and fractional
    • Numpy mathematical functions: Miscellaneous
    • Summary and examples: Numpy utility functions
    • Arithmetic operations with scalars and iterables
    • Numerical transformations and descriptive statistics
    • Standard decompositions and linear solving
    • Singular Value and Eigen decompositions
    • Analytic functions of a matrix
    • Discrete Fourier transform (DFT)
    • Flint/Functions for matrices

Special Functions

  • Elliptic functions and related
    • Carlson symmetric elliptic integrals
    • Legendre elliptic integrals (elliptic parameter \(m\))
    • Legendre elliptic integrals (elliptic modulus \(k\)), and related functions
    • Jacobi elliptic functions
    • Jacobi theta functions and related functions
    • Conversions of parameters of Weierstrass \(\wp\)
    • Weierstrass elliptic functions, in terms of elliptic period ratio \(\tau\)
    • Modular forms, in terms of half-period \(\omega_1\) and elliptic period ratio \(\tau\)
  • Lerch’s phi and related
    • Lerch’s transcendent and Lerch’s zeta
    • Polygamma and related functions
    • Polylogarithm and related functions
    • Hurwitz zeta and related functions
    • Riemann zeta function, and related functions
  • Hypergeometric function \(\,_0F_1\) and related
    • Hypergeometric Limit Function \(\,_0F_1\)
    • Bessel functions
    • Modified Bessel functions
    • Spherical Bessel functions
    • Modified spherical Bessel functions
    • Hankel functions
    • Airy functions
    • Kelvin functions
  • Hypergeometric function \(\,_1F_1\) and related
    • Hypergeometric Functions \(\,_1F_1\) (Kummer) and \(U\) (Tricomi)
    • Incomplete gamma functions
    • Coulomb, Whittaker and parabolic cylinder function
    • Error function and related functions
    • Exponential integrals, and related functions
  • Hypergeometric functions \(\,_2F_1\) and \(\,_1F_2\) (and related functions)
    • Gauss Hypergeometric Function \(\,_2F_1\)
    • Chebyshev, Gegenbauer and Jacobi polynomials
    • Legendre polynomials and related
    • Incomplete beta functions
    • Hypergeometric function \({}_1F_2\)
    • Scorer functions
    • Struve functions
    • Anger, Weber and Lommel functions

Supporting Functions

  • Algebra with random variables
    • Probability density function (pdf)
    • Probability mass function (pmf)
    • Cumulative distribution function (cdf)
    • Quantile function
    • Characteristic function
    • Moment generating function
    • Cumulant generating function
    • Probability generating function
    • Factorial Moments
    • Raw Moments
    • Central Moments
    • Cumulants
  • Series and integrals
    • Finite series algorithms for selected distributions
    • Infinite series algorithms for selected functions and distributions
    • Finite series for lattice distributions, based on factorial moments
    • Efficient integration of bell-shaped functions
    • Verified numerical integration
  • Pmf vectors
    • Basic discrete (lattice) distribution functions
    • Discrete (lattice) distribution functions related to (stratified) rank tests
    • Discrete (non-lattice) distribution functions related to rank tests
  • Fast approximations
    • Approximations based on the normal distribution
    • Approximations based on the chi-squared distribution
    • Approximations based on the central \(t\), \(F\) or beta distribution
    • Approximations based on the noncentral chi-squared distribution
    • Approximations based on the noncentral F or beta distribution
    • Approximations based on hypergeometric functions of scalar argument

Gallery of Plots

  • Visualisation of datasets
    • Bar Charts
    • Line and lollipop charts
    • Area Plots
    • Boxplot, Violinplot and Raincloud plot
    • Correlation and regression
    • Financial plots (requires mplfinance)
    • Geographic data (requires cartopy)
    • Geographic data (requires geopandas)
    • Parts of a whole
    • Arcplots, dendrograms, heatmaps and clustermaps
    • PlotTable
    • Flow and connections
    • Circular plots and flows
    • Network data (requires networkx)
  • Visualisation of functions and curves (2D)
    • Introduction to 2D functions and curves
    • Basic curves
    • Spirals
    • Decorative curves
    • General curve families
    • Field lines
    • Contours
    • Complex functions rendered as contours
    • Streams, barbs and quivers (some require cartopy)
  • Bitmaps
    • Fractals: introduction
    • Fractals related to the Mandelbrot set
    • Fractals related to the Julia set
    • Newton Fractals
    • Domain coloring options
    • Domain coloring: Examples part 1
  • Matplotlib 3D Graphics
    • Introduction
    • Matplotlib: 3D Graphics, part 2
    • S3dlib: Basic geometric figures
    • S3dlib: Real functions
    • S3dlib: Parametric Surfaces
    • S3dlib: Image mapping and clipping
    • S3dlib: Edge-to-edge surface coloring
    • S3dlib: Decorative parametric surfaces
    • S3dlib: Geometric and color datagrid mapping (requires scipy)
    • S3dlib: Implicit surfaces (requires scikit-image)
  • Plotly
    • General surface plots in 3D
    • Geographical plots
    • Sankey plots

Interactive 3D Wpf Plots

  • Wpf: Altitude surfaces in 3D, real and complex functions
    • Special techniques for height surfaces, real and complex functions
    • Scatterplots and building 3D scenes
    • Height plots of general bivariate real functions
  • Wpf: Parametric surfaces
    • Surfaces of translation
    • Surfaces of revolution: spheres and related
    • Generalisations of common surfaces
    • Minimal surfaces
    • Nonorientable (one-sided) Surfaces
    • Decorative parametric surfaces
  • Wpf: Path surfaces in 3D
    • Introduction to path surfaces
    • Functions with real input and complex results
    • Characteristic functions of statistical distributions
    • Helices and related curves traced on cylinders, cones and spheres
    • Coil springs
    • General knots
    • Torus knots
    • Lissajous knots
    • Polynomial knots
  • Wpf: Built-in 3D objects
    • Builtin solids with support for textures
    • Builtin solids without support for textures
    • Platonic solids, and related solids

User library: numerical

  • Additional Classes
    • User defined functions based on multiple precision arithmetic (Python)
    • User defined functions based on fixed precision arithmetic (C#)
    • User defined functions based on arbitrary precision arithmetic (C#)
    • Scalar functions
  • Distribution functions
    • Distributions related to multiple comparisons of means
    • Discrete (lattice) distribution functions related to (stratified) rank tests
    • Discrete (non-lattice) distribution functions related to rank tests
  • Inferential statistics
    • Basic classical statistical tests (stratified)
    • Basic classical statistical tests for 2 independent samples (stratified)
    • Basic classical statistical tests for 2 correlated samples (stratified)
    • Analysis of variance (ANOVA), orthogonal polynomials, and analysis of means (AOM)
    • Multiple comparisons of means
    • Nonparametric statistical tests, 1 or 2 samples
    • Nonparametric statistical tests, k samples
    • Multivariate statistical tests
  • Addditional elementary functions (real arguments, double precision)
    • Additional root, exponential, logarithmic and power functions
    • Additional Trigonometric functions (real arguments only)
    • Additional real error functions (real arguments only)
    • Additional real gamma functions (real arguments only)
    • Additional real incomplete gamma functions (real arguments only)
  • Addditional special functions (real arguments, double precision)
    • Conversions of parameters of elliptic functions
    • Additional elliptic integrals
    • Bulirsch elliptic integrals
    • Maple style elliptic integrals
    • Jacobi theta functions at \(x=0\) for \(0 \le q <1\)
    • Inverse Jacobi elliptic functions
    • Lemniscate functions
    • Neville theta functions
    • Polygamma, and related functions
    • Polylogarithm, and related functions
    • Riemann zeta, and related functions
    • Bessel functions of integer order
    • Modified Bessel functions of integer order
    • Integrals of zero-order Bessel functions
    • Kelvin functions of order 0
    • Synchrotron functions
    • Error function, and related functions
    • Exponential integrals, and related functions
    • Coulomb, Whittaker and parabolic cylinder function
    • Hypergeometric pFq, and related functions
    • Miscellaneous functions
  • Addditional special functions (complex arguments, double precision)
    • Conversions of parameters of Weierstrass \(\wp\)
    • Weierstrass elliptic functions, in terms of (real) lattice invariants \(g_2, g_3\)
    • Weierstrass elliptic functions, in terms of (real) lattice roots \(e_1, e_2\)
    • Weierstrass elliptic functions, in terms of lattice half-periods \(\omega_1\) and \(\omega_2\)
  • Addditional special functions (Mpmath)
    • Mpmath: Conversions of parameters of elliptic functions
    • Related to Lerch’s phi
    • Additional numbertheoretic functions
    • Generalized hypergeometric functions
    • Appell Functions
    • Q Functions
    • Further generalizations of gamma and hypergeometric functions

Back matter

  • License and History
    • Mozilla Public License Version 2.0
    • History

Indices

  • General Index
  • .rst

Error function and related functions

Contents

  • Error function, \(\mathrm{erf}(x)\)
    • ctx.erf()
  • Complementary error function, \(\mathrm{erfc}(x)\)
    • ctx.erfc()
  • Inverse of the real error function, \(\mathrm{erf}^{-1}(x)\)
    • ctx.erf_inv()
  • Inverse of the real complementory error function, \(\mathrm{erfc}^{-1}(x)\)
    • ctx.erfc_inv()
  • Standard normal density function \(\phi(x)\)
    • ctx.ndens()
  • Standard normal cumulative distribution function \(\Phi(x)\)
    • ctx.ndis()
  • Imaginary error function, \(\mathrm{erfi}(x)\)
    • ctx.erfi()
  • Dawson integral, \(F(x)\)
    • math53.dawson()
  • Faddeeva function, \(w(z)\)
    • math53.faddeeva()
  • Fresnel sine integral, \(S(x)\)
    • ctx.fresnel_s()
  • Fresnel cosine integral, \(C(x)\)
    • ctx.fresnel_c()
  • Owen’s T function, \(T(h,a)\)
    • ctx.owen_t()

Error function and related functions#

Error function, \(\mathrm{erf}(x)\)#

ctx.erf(x)#

where ctx is math53, mathc53, ctxboost, ctxflint.

Returns the real error function \(\displaystyle \mathrm{erf}(x) = \frac{2}{\sqrt \pi} \int_0^x \exp(-t^2) \mathrm{d}t\). See also BoostMath [100], BoostMath [80], Wikipedia [1340], MathWorld [916], NIST [843], Ehrhardt [309] (4.2.32), Flint [803], Flint [793], Mpmath [571].

This function returns the value of the error function defined by

\[\text{erf}(z) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-z^2} \mathrm{d}t = \frac{2 z}{\sqrt{\pi}} {}_1F_1 \left(\tfrac{1}{2}, \tfrac{3}{2}, -z^2 \right).\]

08a_TestErf_re \(\quad\) 08b_TestErf_im \(\quad\) 08c_TestErf_abs

Left figure: real part of the Erf function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Erf function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Erf function, with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Dawson(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.Dawson('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Dawson(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Dawson('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.erf(x); mx = mpm.erf(x); gx = gmp.erf(x)
>>> fx = fpm.erf(x); ax = apm.erf(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  9.999779095030014145586272238704176796201E-1
mpm:  9.999779095030014145586272238704176796201e-1
gmp:  9.999779095030014145586272238704176796201E-01
fpm:  9.99977909503001E-01
apm:  9.999779095030014145586272238704176796202e-1 (5.74e-40%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.erf(z); mz = mpm.erf(z); gz = gmp.erf(z)
>>> fz = fpm.erf(z); az = apm.erf(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: -1.2018699139507944410E+2               - 2.7750337293623902498E+1j
mpm: -1.2018699139507944410e+2               - 2.7750337293623902498e+1j
gmp: -1.2018699139507944410E+02              - 2.7750337293623902498E+01j
fpm: -1.20186991395079E+02                   - 2.77503372936239E+01j
apm: -1.2018699139507944410e+2 (-9.021e-20%) - 2.7750337293623902498e+1 (-4.884e-20%)j

Complementary error function, \(\mathrm{erfc}(x)\)#

ctx.erfc(x)#

where ctx is math53, mathc53, ctxboost, ctxflint.

Returns the complementary error function \(\displaystyle \mathrm{erfc}(x) = 1-\mathrm{erf}(x) = \frac{2}{\sqrt \pi} \int_x^{\infty} \exp(-t^2)\, \mathrm{d}t\).

See also BoostMath [80], Wikipedia [1337], MathWorld [917], NIST [843], MathWorld [1051], Ehrhardt [309] (3.3.5), Ehrhardt [309] (4.2.33), Mpmath [570].

Returns the value of the complementary error function defined by

\[\text{erfc}(x) = 1-\text{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_x^\infty e^{-x^2} \mathrm{d}t,\]

09a_TestErfc_re \(\quad\) 09b_TestErfc_im \(\quad\) 09c_TestErfc_abs

Left figure: real part of the Erfc function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Erfc function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Erfc function, with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Erfc(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.Erfc('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Erfc(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Erfc('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.erfc(x); mx = mpm.erfc(x); gx = gmp.erfc(x)
>>> fx = fpm.erfc(x); ax = apm.erfc(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  2.209049699858544137277612958232037984771E-5
mpm:  2.209049699858544137277612958232037984771e-5
gmp:  2.209049699858544137277612958232037984771E-05
fpm:  2.20904969985854E-05
apm:  2.209049699858544137277612958232037984771e-5 (1.586e-39%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.erfc(z); mz = mpm.erfc(z); gz = gmp.erfc(z)
>>> fz = fpm.erfc(z); az = apm.erfc(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: 1.2118699139507944410E+2              + 2.7750337293623902498E+1j
mpm: 1.2118699139507944410e+2              + 2.7750337293623902498e+1j
gmp: 1.2118699139507944410E+02             + 2.7750337293623902498E+01j
fpm: 1.21186991395079E+02                  + 2.77503372936239E+01j
apm: 1.2118699139507944410e+2 (8.947e-20%) + 2.7750337293623902498e+1 (4.884e-20%)j

Inverse of the real error function, \(\mathrm{erf}^{-1}(x)\)#

ctx.erf_inv(q)#

where ctx is math53, ctxcpp, ctxboost or ctxflint.

Returns the inverse of the real error function, satisfying \(\mathrm{erf}(\mathrm{erfinv}(x)) = \mathrm{erfinv}(\mathrm{erf}(x)) = x\). See also BoostMath [79], Wikipedia [1340], MathWorld [922], NIST [843], Flint [803], Mpmath [577].

This function is defined only for \(-1 \le x \le 1\).

>>> from xlcalcnet import dec, mpm, ipm, fpm, gmp, apm
>>> mpm.dps = 40; q = '0.007'
>>> \mathrm{d}x = dec.real_erfinv(q); mx = mpm.real_erfinv(q); ix = ipm.real_erfinv(q)
>>> fx = fpm.real_erfinv(q); gx = gmp.real_erfinv(q); ax = apm.real_erfinv(q)
>>> mpm.show([\mathrm{d}x, mx, ix, fx, gx, ax])
dec:  6.203668061000835402417689089205287381720E-3
mpm:  6.203668061000835531560785950441696784170e-3
ipm:  6.203668061000835531560785950441696784170e-3 (7.228e-40%)
fpm:  6.20366806100084E-03
gmp:  6.203668061000835315388357571464439388365E-03
apm:  6.203668061000835531560785950441696784170e-3 (7.228e-40%)

Inverse of the real complementory error function, \(\mathrm{erfc}^{-1}(x)\)#

ctx.erfc_inv(q)#

where ctx is math53, ctxcpp, ctxboost or ctxflint.

Returns the inverse of the real complementory error function, satisfying \(\mathrm{erfc}(\mathrm{erfcinv}(x)) = \mathrm{erfcinv}(\mathrm{erfc}(x)) = x\). See also BoostMath [79], Wikipedia [1337], MathWorld [923], NIST [843], Flint [803].

This function is defined only for \(-1 \le x \le 1\).

>>> from xlcalcnet import dec, mpm, ipm, fpm, gmp, apm
>>> mpm.dps = 40; q = '0.007'
>>> \mathrm{d}x = dec.real_erfcinv(q); mx = mpm.real_erfcinv(q); ix = ipm.real_erfcinv(q)
>>> fx = fpm.real_erfcinv(q); gx = gmp.real_erfcinv(q); ax = apm.real_erfcinv(q)
>>> mpm.show([gx, fx, ax])
dec:  1.906956864670945611335498085438891420125E+0
mpm:  1.906956864670945606433652487714446631717e+0
ipm:  1.906956864670945606433652487714446631717e+0 (6.02e-40%)
fpm:  1.90695686467095E+00
gmp:  1.906956864670945611335498085438891420125E+00
apm:  1.906956864670945606433652487714446631717e+0 (6.02e-40%)

Standard normal density function \(\phi(x)\)#

ctx.ndens(x)#

where ctx is math53, ctxcpp, ctxboost or ctxflint.

Note: also math53.erfZ(x), math53.ndens(x), mathc53.Ndens(x)

Returns the Gaussian density function \(\displaystyle \phi(z) = \frac{1}{\sqrt {2\pi}} \exp(-z^2)\). See also: Ehrhardt [309] (3.3.12.3) and (3.9.28).

An example:

>>> from xlcalcnet import dec, mpm, ipm, fpm, gmp, apm
>>> mpm.dps = 40; x = '1.2'; mu = '0'; sd = '1';
>>> \mathrm{d}x = dec.normal_pdf(x, mu, sd); mx = mpm.normal_pdf(x, mu, sd)
>>> ix = ipm.normal_pdf(x, mu, sd); fx = fpm.normal_pdf(x, mu, sd)
>>> gx = gmp.normal_pdf(x, mu, sd); ax = apm.normal_pdf(x, mu, sd)
>>> mpm.show([\mathrm{d}x, mx, ix, fx, gx, ax])
dec:  1.941860549832129404120911390335162607571E-1
mpm:  1.941860549832129404120911390335162607571e-1
ipm:  1.941860549832129404120911390335162607571e-1 (5.173e-39%)
fpm:  1.94186054983213E-01
gmp:  1.941860549832129404120911390335162607571E-01
ipm:  1.941860549832129404120911390335162607571e-1 (5.173e-39%)

Standard normal cumulative distribution function \(\Phi(x)\)#

ctx.ndis(x)#

where ctx is math53, ctxcpp, ctxboost or ctxflint.

Note: also math53.erfP(x), math53.ndis(x), mathc53.Ndis(x)

Returns the integral \(\displaystyle \Phi(z) = \frac{1}{\sqrt 2\pi} \int_{-\infty}^z \exp(-t^2)\, \mathrm{d}t = \frac{1}{2} \mathrm{erfc}\left(-\frac{z}{\sqrt{2}} \right)\).

See also BoostMath [80], Wikipedia [1337], MathWorld [917], NIST [843], MathWorld [1051], Ehrhardt [309] (3.3.12.1) and (3.9.28).

An example:

>>> from xlcalcnet import dec, mpm, ipm, fpm, gmp, apm
>>> mpm.dps = 40; x = '1.2'; mu = '0'; sd = '1';
>>> \mathrm{d}x = dec.normal_cdf(x, mu, sd); mx = mpm.normal_cdf(x, mu, sd)
>>> ix = ipm.normal_cdf(x, mu, sd); fx = fpm.normal_cdf(x, mu, sd)
>>> gx = gmp.normal_cdf(x, mu, sd); ax = apm.normal_cdf(x, mu, sd)
>>> mpm.show([\mathrm{d}x, mx, ix, fx, gx, ax])
dec:  8.849303297782917319777797930433648513245E-1
mpm:  8.849303297782917319777797930433648513246e-1
ipm:  8.849303297782917319777797930433648513245e-1 (6.486e-40%)
fpm:  8.84930329778292E-01
gmp:  8.849303297782917319777797930433648513246E-01
ipm:  8.849303297782917319777797930433648513246e-1 (1.297e-39%)

Imaginary error function, \(\mathrm{erfi}(x)\)#

ctx.erfi(x)#

where ctx is math53, mathc53, ctxflint.

Returns the imaginary error function \(\displaystyle \mathrm{erfi}(x) = \frac{2}{\sqrt \pi} \int_0^x \exp(t^2)\, \mathrm{d}t = \frac{2}{\sqrt \pi} e^{x^2} \mathrm{dawson}(x)\).

Returns the imaginary error function \(\displaystyle \mathrm{erfi}(z) = -i \mathrm{erf}(i z)\).

See also Wikipedia [1345], MathWorld [918], Ehrhardt [309] (3.3.8), Flint [803], Flint [793], Mpmath [572].

The function is defined as:

\[\text{erfi}(x) = \frac{1}{i} \text{erf}(ix).\]

\(\text{erfi}(x)\) is computed using the Dawson integral as

\[\text{erfi}(x) = \frac{2}{\sqrt{\pi}} e^{x^2} \text{dawson}(x).\]

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Erfi(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.Erfi('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Erfi(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Erfi('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.erfi(x); mx = mpm.erfi(x); gx = gmp.erfi(x)
>>> fx = fpm.erfi(x); ax = apm.erfi(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.629994622601565651061647952076274162779E+3
mpm:  1.629994622601565651061647952076274162779e+3
gmp:  1.629994622601565651061647952076274162779E+03
fpm:  1.62999462260157E+03
apm:  1.629994622601565651061647952076274162779e+3 (7.212e-40%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.erfi(z); mz = mpm.erfi(z); gz = gmp.erfi(z)
>>> fz = fpm.erfi(z); az = apm.erfi(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: -4.9720260544966036460E-5              + 9.9991066178539168236E-1j
mpm: -4.9720260544966036460e-5              + 9.9991066178539168236e-1j
gmp: -4.9720260544966036460E-05             + 9.9991066178539168236E-01j
fpm: -4.97202605449660E-05                  + 9.99910661785392E-01j
apm: -4.9720260544966036460e-5 (-1.56e-18%) + 9.9991066178539168236e-1 (4.236e-20%)j

Dawson integral, \(F(x)\)#

math53.dawson(x)#

Returns the Dawson integral \(\displaystyle F(z) = e^{-z^2} \int_0^z e^{t^2} \mathrm{d}t = \frac{\sqrt{\pi}}{2} e^{-z^2} \mathrm{erfi}(z)\). See also Wikipedia [1446], MathWorld [1047], Ehrhardt [309] (3.3.1), NIST [457].

Dawson’s integral is defined by

\[F(x) = e^{-x^2} \int_0^x e^{-x^2} \mathrm{d}t,\]

In terms of either erfi or the Faddeeva function w(z), the Dawson function can be extended to the entire complex plane:[3]

\[F(z)={{\sqrt {\pi }} \over 2}e^{-z^{2}}\mathrm {erfi} (z)={\frac {i{\sqrt {\pi }}}{2}}\left[e^{-z^{2}}-w(z)\right],\]

14a_TestDawson_re \(\quad\) 14b_TestDawson_im \(\quad\) 14c_TestDawson_abs

Left figure: real part of the Dawson integral, \(F(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Dawson integral, \(F(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Dawson integral, \(F(x)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.Dawson(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.Dawson('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.Dawson(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.Dawson('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.dawson(x); mx = mpm.dawson(x); gx = gmp.dawson(x)
>>> fx = fpm.dawson(x); ax = apm.dawson(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  1.782710306105582873425994922405126302292E-1
mpm:  1.782710306105582873425994922405126302292e-1
gmp:  1.782710306105582873425994922405126302292E-01
fpm:  1.78271030610558E-01
apm:  1.782710306105582873425994922405126302293e-1 (1.409e-37%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.dawson(z); mz = mpm.dawson(z); gz = gmp.dawson(z)
>>> fz = fpm.dawson(z); az = apm.dawson(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: -8.8004253885450449691E+2               + 4.1216449595391869731E+2j
mpm: -8.8004253885450449691e+2               + 4.1216449595391869731e+2j
gmp: -8.8004253885450449691E+02              + 4.1216449595391869731E+02j
fpm: -8.80042538854505E+02                   + 4.12164495953919E+02j
apm: -8.8004253885450449493e+2 (-4.535e-16%) + 4.1216449595391869602e+2 (4.615e-16%)j

Faddeeva function, \(w(z)\)#

math53.faddeeva(z)#

Returns the Faddeeva function function

See also Wikipedia [1428], NIST [458].

The Faddeeva function or Kramp function is a scaled complex complementary error function,

\[w(z):=e^{-z^{2}}\operatorname {erfc} (-iz)=\operatorname {erfcx} (-iz)=e^{-z^{2}}\left(1+{\frac {2i}{\sqrt {\pi }}}\int _{0}^{z}e^{t^{2}}{\text{d}}t\right).\]

It is related to the Fresnel integral, to Dawson’s integral, and to the Voigt function.

15a_TestFaddeevaW_re \(\quad\) 15b_TestFaddeevaW_im \(\quad\) 15c_TestFaddeevaW_abs

Left figure: real part of the Faddeeva function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Faddeeva function. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Faddeeva function, with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import XComplex
>>> XComplex.Faddeeva(0.5)
XComplex('5.2359877559829887307E-1')
>>> XComplex.Faddeeva('0.1')
XComplex('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpc
>>> Gpc.Faddeeva(0.5)
Gpc('5.2359877559829887307E-1')
>>> Gpc.Faddeeva('0.1')
Gpc('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; x = 3.0
>>> \mathrm{d}x = dec.faddeeva(x); mx = mpm.faddeeva(x); gx = gmp.faddeeva(x)
>>> fx = fpm.faddeeva(x); ax = apm.faddeeva(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax], aligned=True)
dec: 1.2340980408667954950E-4              + 2.0115731703760038666E-1j
mpm: 1.2340980408667954950e-4              + 2.0115731703760038666e-1j
gmp: 1.2340980408667954950E-04             + 2.0115731703760038666E-01j
fpm: 1.23409804086680E-04                  + 2.01157317037600E-01j
apm: 1.2340980408667954950e-4 (8.378e-20%) + 2.0115731703760038666e-1 (3.158e-19%)j

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.faddeeva(z); mz = mpm.faddeeva(z); gz = gmp.faddeeva(z)
>>> fz = fpm.faddeeva(z); az = apm.faddeeva(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: 9.0933904194765342461E-2              + 6.5592330527914277737E-2j
mpm: 9.0933904194765342461e-2              + 6.5592330527914277737e-2j
gmp: 9.0933904194765342461E-02             + 6.5592330527914277737E-02j
fpm: 9.09339041947653E-02                  + 6.55923305279143E-02j
apm: 9.0933904194765342460e-2 (2.911e-19%) + 6.5592330527914277737e-2 (4.035e-19%)j

Fresnel sine integral, \(S(x)\)#

ctx.fresnel_s(z)#

where ctx is math53, mathc53, ctxflint.

Returns the Fresnel sine integral \(\displaystyle S(x) = \int_0^x \sin\left(\frac{\pi t^2}{2}\right) \, \mathrm{d}t\).

See also Wikipedia [1429], MathWorld [1055], NIST [845],, Ehrhardt [309] (3.3.14), Flint [803], Flint [793], Mpmath [686].

The complex Fresnel sine integral can be expressed using the error function as follows:

\[S(z) = \sqrt {\frac {\pi }{2}} {\frac {1+i}{4}}\left[ \operatorname{erf} \left({\frac {1+i}{\sqrt {2}}}z\right)-i \operatorname{erf} \left({\frac {1-i}{\sqrt {2}}}z\right)\right].\]

See also: https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.fresnel.html#scipy.special.fresnel

10a_TestFresnelS_re \(\quad\) 10b_TestFresnelS_im \(\quad\) 10c_TestFresnelS_abs

Left figure: real part of the Fresnel sine integral, \(S(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Fresnel sine integral, \(S(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Fresnel sine integral, \(S(x)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.FresnelS(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.FresnelS('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.FresnelS(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.FresnelS('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.fresnels(x); mx = mpm.fresnels(x); gx = gmp.fresnels(x)
>>> fx = fpm.fresnels(x); ax = apm.fresnels(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  4.963129989673750360976122652991121038565E-1
mpm:  4.963129989673750360976122652991121038565e-1
gmp:  4.963129989673750360976122652991121038565E-01
fpm:  4.96312998967375E-01
apm:  4.963129989673750360976122652991121038565e-1 (9.252e-39%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.fresnels(z); mz = mpm.fresnels(z); gz = gmp.fresnels(z)
>>> fz = fpm.fresnels(z); az = apm.fresnels(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: 6.0975480744693149379E+14             + 4.5370167667746719242E+14j
mpm: 6.0975480744693149379e+14             + 4.5370167667746719242e+14j
gmp: 6.0975480744693149379E+14             + 4.5370167667746719242E+14j
fpm: 6.09754807446932E+14                  + 4.53701676677467E+14j
apm: 6.0975480744693149379e+14 (7.82e-20%) + 4.5370167667746719242e+14 (5.255e-20%)j

Fresnel cosine integral, \(C(x)\)#

ctx.fresnel_c(z)#

where ctx is math53, mathc53, ctxflint.

Returns the Fresnel cosine integral \(\displaystyle C(x) = \int_0^x \cos\left(\frac{\pi t^2}{2}\right) \, \mathrm{d}t\).

See also Wikipedia [1429], MathWorld [1054], NIST [845], Ehrhardt [309] (3.3.14), Flint [803], Flint [793], Mpmath [685].

The complex Fresnel cosine integral can be expressed using the error function as follows:

\[C(z) = \sqrt {\frac {\pi }{2}} {\frac {1-i}{4}}\left[ \operatorname{erf} \left({\frac {1+i}{\sqrt {2}}}z\right)+i \operatorname{erf} \left({\frac {1-i}{\sqrt {2}}}z\right)\right].\]

11a_TestFresnelC_re \(\quad\) 11b_TestFresnelC_im \(\quad\) 11c_TestFresnelC_abs

Left figure: real part of the Fresnel cosine integral, \(C(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Middle figure: imaginary part of the Fresnel cosine integral, \(C(x)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

Right figure: absolute value of the Fresnel cosine integral, \(C(x)\), with color-coded phase. Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.FresnelC(0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.FresnelC('0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.FresnelC(0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.FresnelC('0.51')
Gpr('5.3518479027559984754E-1')

An example with real input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 40; x = 3.0
>>> \mathrm{d}x = dec.fresnelc(x); mx = mpm.fresnelc(x); gx = gmp.fresnelc(x)
>>> fx = fpm.fresnelc(x); ax = apm.fresnelc(x)
>>> mpm.show([\mathrm{d}x, mx, gx, fx, ax])
dec:  6.057207892976856295561610742871546971452E-1
mpm:  6.057207892976856295561610742871546971452e-1
gmp:  6.057207892976856295561610742871546971452E-01
fpm:  6.05720789297686E-01
apm:  6.057207892976856295561610742871546971452e-1 (9.476e-40%)

An example with complex input:

>>> from xlcalcnet import dec, mpm, gmp, fpm, apm
>>> mpm.dps = 20; z = '3.0 + 4.0j'
>>> \mathrm{d}z = dec.fresnelc(z); mz = mpm.fresnelc(z); gz = gmp.fresnelc(z)
>>> fz = fpm.fresnelc(z); az = apm.fresnelc(z)
>>> mpm.show([\mathrm{d}z, mz, gz, fz, az], aligned=True)
dec: 4.5370167667746769242E+14              - 6.0975480744693099379E+14j
mpm: 4.5370167667746769242e+14              - 6.0975480744693099379e+14j
gmp: 4.5370167667746769242E+14              - 6.0975480744693099379E+14j
fpm: 4.53701676677468E+14                   - 6.09754807446931E+14j
apm: 4.5370167667746769242e+14 (5.255e-20%) - 6.0975480744693099379e+14 (-7.82e-20%)j

Owen’s T function, \(T(h,a)\)#

ctx.owen_t(h, a)#

where ctx is math53 or ctxflint.

Returns Owen’s T function \(\displaystyle T(h,a) = \frac {1}{2\pi } \int _{0}^{a} f(x) \mathrm{d}x = \frac {a}{4\pi } \int _{-1}^{1} f(ax) \mathrm{d}x, \quad f(x) = {\frac {e^{-{\frac {1}{2}}h^{2}(1+x^{2})}}{1+x^{2}}}, \quad \left(-\infty <h,a<+\infty \right)\).

See also Owen [476], and Patefield and Tand [486], Wikipedia [1460], MathWorld [1088], Ehrhardt [309] (3.3.17).

OwenT

Left figure: real (“silver”) and imaginary (“gold”) part of Owen’s T function, \(T(h,a)\). Camera angles are \(\theta=135^\circ\) and \(\phi = -12^\circ\), camera radius is -2.

An example in Python

>>> from xlcalcnet import xreal
>>> xreal.OwenT(2.5, 0.5)
xreal('5.2359877559829887307E-1')
>>> xreal.OwenT(2.5, '0.51')
xreal('5.3518479027559984754E-1')

An example in Visual Basic

>>> from xlcalcnet import Gpr
>>> Gpr.OwenT(2.5, 0.5)
Gpr('5.2359877559829887307E-1')
>>> Gpr.OwenT(2.5, '0.51')
Gpr('5.3518479027559984754E-1')

previous

Coulomb, Whittaker and parabolic cylinder function

next

Exponential integrals, and related functions

Contents
  • Error function, \(\mathrm{erf}(x)\)
    • ctx.erf()
  • Complementary error function, \(\mathrm{erfc}(x)\)
    • ctx.erfc()
  • Inverse of the real error function, \(\mathrm{erf}^{-1}(x)\)
    • ctx.erf_inv()
  • Inverse of the real complementory error function, \(\mathrm{erfc}^{-1}(x)\)
    • ctx.erfc_inv()
  • Standard normal density function \(\phi(x)\)
    • ctx.ndens()
  • Standard normal cumulative distribution function \(\Phi(x)\)
    • ctx.ndis()
  • Imaginary error function, \(\mathrm{erfi}(x)\)
    • ctx.erfi()
  • Dawson integral, \(F(x)\)
    • math53.dawson()
  • Faddeeva function, \(w(z)\)
    • math53.faddeeva()
  • Fresnel sine integral, \(S(x)\)
    • ctx.fresnel_s()
  • Fresnel cosine integral, \(C(x)\)
    • ctx.fresnel_c()
  • Owen’s T function, \(T(h,a)\)
    • ctx.owen_t()

By Dietrich Hadler

© Copyright 2026, Dietrich Hadler. .

Last updated on Aug 19, 2026.