Skip to content

Erfc ​

The complementary error function erfc⁡(z)=1−erf⁡(z)\operatorname{erfc}(z) = 1 - \operatorname{erf}(z), the Gaussian's tail-probability integral.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaError functionMathWorldErfcErfWikidataQ579262DLMF7.2.E27.2.E1FungrimErfc✓Fungrim entry7f355d✓ae3110bfc86e✓ec0205✓Wolfram LanguageErfc!
Erfc(z)the complementary error function erfc⁡(z)=1−erf⁡(z)\operatorname{erfc}(z) = 1 - \operatorname{erf}(z).
SageMatherfc(z)SymPyerfc(z)mpmatherfc(z)Juliaenumeratio_ball(erfc, z)Rusterfc(z)
Typed signatures
TypePackageApplies
(complex | signed_infinity) -> complexanalyticreplaces compute-enginealways
(complex | signed_infinity) -> complexcompute-enginealways

Domain: Special functions

Details
  • Defined as erfc⁡(z)=1−erf⁡(z)\operatorname{erfc}(z) = 1 - \operatorname{erf}(z). See Erf.
  • erfc⁡(0)=1\operatorname{erfc}(0) = 1, erfc⁡(∞)=0\operatorname{erfc}(\infty) = 0, erfc⁡(−∞)=2\operatorname{erfc}(-\infty) = 2.
  • erfc⁡(−z)=2−erfc⁡(z)\operatorname{erfc}(-z) = 2 - \operatorname{erfc}(z), the mirror image of Erf's oddness.
  • Computed directly from a continued fraction for large ∣z∣|z| rather than as 1−erf⁡(z)1-\operatorname{erf}(z), since that subtraction would lose all precision once erf⁡(z)\operatorname{erf}(z) rounds to ±1\pm1.
  • compute-engine requires an inexact (floating-point) argument to produce a numeric value under plain evaluation, the same convention as Erf.

Plot

ComplexPlot
real slice

Examples

Basic #
live ↗
Inerfc⁡(0)\operatorname{erfc}(0)Out11
live ↗
Inerfc⁡(∞)\operatorname{erfc}(∞)Out00
live ↗
Inerfc⁡(−∞)\operatorname{erfc}(-∞)Out22

A floating-point argument evaluates directly to a high-precision decimal

live ↗
Inerfc⁡(0.5)\operatorname{erfc}(0.5)Out0.479 500 122 186 953 462 3170.479\,500\,122\,186\,953\,462\,317

A machine-precision argument

live ↗
Inerfc⁡(1.5)\operatorname{erfc}(1.5)Out0.033 894 853 524 689 272 9330.033\,894\,853\,524\,689\,272\,933
live ↗
InSeries⁡(erfc⁡(x),x,0,10)\operatorname{Series}(\operatorname{erfc}(x), x, 0, 10)Out1−2xπ+2x33π−x55π+x721π−x9108π+O(x11)1-\frac{2x}{\sqrt{π}}+\frac{2x^3}{3\sqrt{π}}-\frac{x^5}{5\sqrt{π}}+\frac{x^7}{21\sqrt{π}}-\frac{x^9}{108\sqrt{π}}+O\left(x^{11}\right)
live ↗
InNormal⁡(Series⁡(erfc⁡(x),x,∞,5))\operatorname{Normal}(\operatorname{Series}(\operatorname{erfc}(x), x, ∞, 5))OutSeries⁡(erfc⁡(x),x,∞,5)\operatorname{Series}(\operatorname{erfc}(x), x, ∞, 5)
Scope #

Threads element-wise over a list, as Wolfram's Listable heads do

live ↗
Inerfc⁡([0,1])\operatorname{erfc}(\bigl\lbrack0, 1\bigr\rbrack)Out[1,erfc⁡(1)]\bigl\lbrack1, \operatorname{erfc}(1)\bigr\rbrack

Complex arguments evaluate, as they do for Erf: erfc⁡(z)=1−erf⁡(z)\operatorname{erfc}(z) = 1 - \operatorname{erf}(z)

live ↗
Inerfc⁡(1.5−i)\operatorname{erfc}(1.5-i)Out−0.078 399 207 498 933 45−0.027 963 711 238 655 847i-0.078\,399\,207\,498\,933\,45-0.027\,963\,711\,238\,655\,847i

Listable: threads over its limits at ±∞\pm\infty

live ↗
Inerfc⁡([∞,−∞])\operatorname{erfc}(\bigl\lbrack∞, -∞\bigr\rbrack)Out[0,2]\bigl\lbrack0, 2\bigr\rbrack

Interval arithmetic: Erfc is decreasing, so the endpoints swap

live ↗
Inerfc⁡(Interval(0.2,0.3))\operatorname{erfc}(\mathrm{Interval}(0.2, 0.3))OutInterval(0.671 373 240 540 872 6,0.777 297 410 789 521 5)\mathrm{Interval}(0.671\,373\,240\,540\,872\,6, 0.777\,297\,410\,789\,521\,5)

Uncertainty propagation

live ↗
Inerfc⁡(Around(2,0.01))\operatorname{erfc}(\mathrm{Around}(2, 0.01))OutAround(0.004 677 734 981 047 266,0.000 206 669 853 540 920 54)\mathrm{Around}(0.004\,677\,734\,981\,047\,266, 0.000\,206\,669\,853\,540\,920\,54)

To 30 significant digits, every one correctly rounded

live ↗
InN(erfc⁡(2),30)N(\operatorname{erfc}(2), 30)Out0.004 677 734 981 047 265 837 930 743 632 750.004\,677\,734\,981\,047\,265\,837\,930\,743\,632\,75

A 50-digit value of erfc(3/2)\mathrm{erfc}(3/2)

live ↗
InN(erfc⁡(32),50)N(\operatorname{erfc}(\frac{3}{2}), 50)Out0.033 894 853 524 689 272 933 023 738 354 052 141 318 589 520 742 3630.033\,894\,853\,524\,689\,272\,933\,023\,738\,354\,052\,141\,318\,589\,520\,742\,363

Matrix function of an off-diagonal complex matrix, expanded through its eigenvalues

live ↗
InFunctionExpand(MatrixFunction(Erfc,[[0,(1/2)iπ],[π,0]]))\mathrm{FunctionExpand}(\mathrm{MatrixFunction}(\mathrm{Erfc}, \bigl\lbrack\bigl\lbrack0, (1/2)i π\bigr\rbrack, \bigl\lbrack π, 0\bigr\rbrack\bigr\rbrack))Out[[12erfc⁡((−1/2−(1/2)i)π)+12erfc⁡((1/2+(1/2)i)π),(−14−14i)erfc⁡((−1/2−(1/2)i)π)+(14+14i)erfc⁡((1/2+(1/2)i)π)],[(12−12i)erfc⁡((1/2+(1/2)i)π)+(−12+12i)erfc⁡((−1/2−(1/2)i)π),12erfc⁡((−1/2−(1/2)i)π)+12erfc⁡((1/2+(1/2)i)π)]]\bigl\lbrack\bigl\lbrack\frac{1}{2}\operatorname{erfc}((-1/2-(1/2)i)π)+\frac{1}{2}\operatorname{erfc}((1/2+(1/2)i)π), (-\frac{1}{4}-\frac{1}{4}i)\operatorname{erfc}((-1/2-(1/2)i)π)+(\frac{1}{4}+\frac{1}{4}i)\operatorname{erfc}((1/2+(1/2)i)π)\bigr\rbrack, \bigl\lbrack(\frac{1}{2}-\frac{1}{2}i)\operatorname{erfc}((1/2+(1/2)i)π)+(-\frac{1}{2}+\frac{1}{2}i)\operatorname{erfc}((-1/2-(1/2)i)π), \frac{1}{2}\operatorname{erfc}((-1/2-(1/2)i)π)+\frac{1}{2}\operatorname{erfc}((1/2+(1/2)i)π)\bigr\rbrack\bigr\rbrack

The reflection identity erfc(−z)=2−erfc(z)\mathrm{erfc}(-z) = 2 - \mathrm{erfc}(z) holds

live ↗
InFullSimplify(erfc⁡(−z)=2−erfc⁡(z))\mathrm{FullSimplify}(\operatorname{erfc}(-z)=2-\operatorname{erfc}(z))OutTrue\mathrm{True}
live ↗
InSeries⁡(erfc⁡(x),x,0,7)\operatorname{Series}(\operatorname{erfc}(x), x, 0, 7)Out1−2xπ+2x33π−x55π+x721π+O(x9)1-\frac{2x}{\sqrt{π}}+\frac{2x^3}{3\sqrt{π}}-\frac{x^5}{5\sqrt{π}}+\frac{x^7}{21\sqrt{π}}+O\left(x^9\right)
live ↗
InNormal⁡(Series⁡(erfc⁡(x),x,∞,1))\operatorname{Normal}(\operatorname{Series}(\operatorname{erfc}(x), x, ∞, 1))OutSeries⁡(erfc⁡(x),x,∞,1)\operatorname{Series}(\operatorname{erfc}(x), x, ∞, 1)
Properties #

erfc⁡(−z)=2−erfc⁡(z)\operatorname{erfc}(-z) = 2 - \operatorname{erfc}(z), here at z=1z = 1

live ↗
Inerfc⁡(−1)+erfc⁡(1)=2\operatorname{erfc}(-1)+\operatorname{erfc}(1)=2OutTrue\mathrm{True}

Definition: erf⁡(z)+erfc⁡(z)=1\operatorname{erf}(z) + \operatorname{erfc}(z) = 1. See Erf

live ↗
Inerf⁡(2)+erfc⁡(2)=1\operatorname{erf}(2)+\operatorname{erfc}(2)=1OutTrue\mathrm{True}

erfc⁡(−x)=2−erfc⁡(x)\operatorname{erfc}(-x) = 2 - \operatorname{erfc}(x) applied symbolically

live ↗
Inerfc⁡(−x)\operatorname{erfc}(-x)Out2−erfc⁡(x)2-\operatorname{erfc}(x)

ddxerfc⁡(x)=−2πe−x2\frac{d}{dx}\operatorname{erfc}(x) = -\frac{2}{\sqrt\pi}e^{-x^2}

live ↗
Inderfc⁡(x)dx\frac{\mathrm{d}\operatorname{erfc}(x)}{\mathrm{d}x}Out−(2e−x2)/π-(2e^{-x^2})/\sqrt{π}
Possible issues #

An exact integer argument is left unevaluated under plain evaluation -- pair with N() or use an inexact argument like 0.5 for a decimal

live ↗
Inerfc⁡(1)\operatorname{erfc}(1)Outerfc⁡(1)\operatorname{erfc}(1)

Far in the tail Erfc keeps full relative precision: erfc⁡(9.5)≈3.8×10−41\operatorname{erfc}(9.5) \approx 3.8\times10^{-41}...

live ↗
Inerfc⁡(9.5)\operatorname{erfc}(9.5)Out3.769 214 485 654 879 941 68⋅10−413.769\,214\,485\,654\,879\,941\,68\cdot10^{-41}

...whereas 1−erf⁡(9.5)1 - \operatorname{erf}(9.5) cancels to exactly 0 in floating point

live ↗
In1−erf⁡(9.5)1-\operatorname{erf}(9.5)Out0.00.0

Erfc(ComplexInfinity) is Indeterminate, inheriting Erf's direction-dependent growth off the real axis

live ↗

Known value · DLMF 7.2.2

Neat examples #

The Gaussian tail shrinks fast: only about 7×10−77\times10^{-7} of the area lies beyond 3.53.5 standard deviations

live ↗
Inerfc⁡(3.5)\operatorname{erfc}(3.5)Out0.000 000 743 098 372 341 412 745 5240.000\,000\,743\,098\,372\,341\,412\,745\,524
About
Examples27
Checked againstWolfram Language 22 agree3 differ2 unevaluatedSageMath 20 agree1 differ3 unevaluatedSymPy 21 agree2 differ2 unevaluatedmpmath 15 agreeJulia 13 agree2 errorRust 12 agree
CrosswalkWikipediaMathWorld ×2WikidataDLMF ×2FungrimFungrim entry ×4Wolfram LanguageSageMathSymPympmathJuliaRust

Implementation

mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts
mappedjuliapackages/oracle/src/mappings.ts
mappedrustpackages/oracle/src/mappings.ts

See also: Erf