Skip to content

InverseErfc ​

The inverse complementary error function: solves erfc⁡(y)=s\operatorname{erfc}(y) = s for 0<s<20 < s < 2. Not simply ErfInv(1 - s) — that loses precision exactly in the tail (s→0s \to 0) InverseErfc exists for.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageInverseErfc!
InverseErfc(s)solves erfc⁡(y)=s\operatorname{erfc}(y) = s for yy.
SymPyerfcinv(s)Rusterfc_inv(s)
Typed signatures
TypePackageApplies
(number) -> numberanalyticalways

Domain: Special functions

Details
  • Built on compute-engine's native ErfInv, but 1−s1 - s is computed as a compute-engine expression (exact rational/bignum arithmetic) rather than a plain double, so the final N() sees a fully precise argument even at s=10−10s = 10^{-10} — where ErfInv of a literal double 1−s1-s would already have dropped several digits.
  • For s>1s > 1, uses erfc⁡(−y)=2−erfc⁡(y)\operatorname{erfc}(-y) = 2 - \operatorname{erfc}(y) to reduce to the s≤1s \le 1 case: InverseErfc⁡(s)=−InverseErfc⁡(2−s)\operatorname{InverseErfc}(s) = -\operatorname{InverseErfc}(2-s).
  • Erfc⁡(InverseErfc⁡(x))=x\operatorname{Erfc}(\operatorname{InverseErfc}(x)) = x holds exactly, symbolic xx included — compute-engine has no general inverse-composition simplification (checked: ErfInv(Erf(x)) stays unevaluated too), so Erfc is extended in place with this one structural cancellation.

Plot

Examples

2 more kept as data, checked against the oracles
Basic #

erfc⁡−1(1/2)=erf⁡−1(1/2)\operatorname{erfc}^{-1}(1/2) = \operatorname{erf}^{-1}(1/2)

live ↗
InInverseErfc(0.5)\mathrm{InverseErfc}(0.5)Out0.476 936 276 204 469 90.476\,936\,276\,204\,469\,9

Known value · Wolfram 15.0.0 InverseErfc

erfc⁡−1(1)=0\operatorname{erfc}^{-1}(1) = 0

live ↗
InInverseErfc(1)\mathrm{InverseErfc}(1)Out00
Scope #

erfc⁡−1(0)=∞\operatorname{erfc}^{-1}(0) = \infty

live ↗
InInverseErfc(0)\mathrm{InverseErfc}(0)Out∞∞

erfc⁡−1(2)=−∞\operatorname{erfc}^{-1}(2) = -\infty

live ↗
InInverseErfc(2)\mathrm{InverseErfc}(2)Out−∞-∞

Arguments in (1,2)(1, 2) give negative values

live ↗
InInverseErfc(1.5)\mathrm{InverseErfc}(1.5)Out−0.476 936 276 204 469 9-0.476\,936\,276\,204\,469\,9

Listable

live ↗
InInverseErfc([0,1])\mathrm{InverseErfc}(\bigl\lbrack0, 1\bigr\rbrack)Out[∞,0]\bigl\lbrack∞, 0\bigr\rbrack

A 50-digit value of erfc−1(0.33)\mathrm{erfc}^{-1}(0.33)

live ↗
InN(InverseErfc(33100),50)N(\mathrm{InverseErfc}(\frac{33}{100}), 50)Out0.688 802 528 116 556 450 402 504 728 905 257 835 449 489 923 493 710.688\,802\,528\,116\,556\,450\,402\,504\,728\,905\,257\,835\,449\,489\,923\,493\,71
live ↗
InFunctionExpand(MatrixFunction(InverseErfc,[[0,1/2],[1,0]]))\mathrm{FunctionExpand}(\mathrm{MatrixFunction}(\mathrm{InverseErfc}, \bigl\lbrack\bigl\lbrack0, 1/2\bigr\rbrack, \bigl\lbrack1, 0\bigr\rbrack\bigr\rbrack))Out[[12InverseErfc(−21/2/2)+InverseErfc(21/2/2)2,142InverseErfc(21/2/2)−142InverseErfc(−21/2/2)],[122InverseErfc(21/2/2)−122InverseErfc(−21/2/2),12InverseErfc(−21/2/2)+InverseErfc(21/2/2)2]]\bigl\lbrack\bigl\lbrack\frac{1}{2}\mathrm{InverseErfc}(-2^{1/2}/2)+\frac{\mathrm{InverseErfc}(2^{1/2}/2)}{2}, \frac{1}{4}\sqrt{2}\mathrm{InverseErfc}(2^{1/2}/2)-\frac{1}{4}\sqrt{2}\mathrm{InverseErfc}(-2^{1/2}/2)\bigr\rbrack, \bigl\lbrack\frac{1}{2}\sqrt{2}\mathrm{InverseErfc}(2^{1/2}/2)-\frac{1}{2}\sqrt{2}\mathrm{InverseErfc}(-2^{1/2}/2), \frac{1}{2}\mathrm{InverseErfc}(-2^{1/2}/2)+\frac{\mathrm{InverseErfc}(2^{1/2}/2)}{2}\bigr\rbrack\bigr\rbrack
live ↗
InSeries⁡(InverseErfc(x),x,1,8)\operatorname{Series}(\mathrm{InverseErfc}(x), x, 1, 8)Out(x−1)InverseErfc′(1)+12InverseErfc′′(1)(x−1)2+16InverseErfc′′′(1)(x−1)3+124InverseErfc(4)(1)(x−1)4+1120InverseErfc(5)(1)(x−1)5+1720InverseErfc(6)(1)(x−1)6+15 040InverseErfc(7)(1)(x−1)7+140 320InverseErfc(8)(1)(x−1)8+O((x−1)9)(x-1)\mathrm{InverseErfc}^{\prime}(1)+\frac{1}{2}\mathrm{InverseErfc}^{\prime\prime}(1)(x-1)^2+\frac{1}{6}\mathrm{InverseErfc}^{\prime\prime\prime}(1)(x-1)^3+\frac{1}{24}\mathrm{InverseErfc}^{(4)}(1)(x-1)^4+\frac{1}{120}\mathrm{InverseErfc}^{(5)}(1)(x-1)^5+\frac{1}{720}\mathrm{InverseErfc}^{(6)}(1)(x-1)^6+\frac{1}{5\,040}\mathrm{InverseErfc}^{(7)}(1)(x-1)^7+\frac{1}{40\,320}\mathrm{InverseErfc}^{(8)}(1)(x-1)^8+O\left((x-1)^9\right)
Applications #

2\sqrt2 times this, 2.5758…2.5758\ldots, is the two-sided 99% normal critical value

live ↗
InInverseErfc(0.01)\mathrm{InverseErfc}(0.01)Out1.821 386 367 718 449 61.821\,386\,367\,718\,449\,6

Known value · Wolfram 15.0.0 InverseErfc

Properties #

erfc⁡(erfc⁡−1(x))=x\operatorname{erfc}(\operatorname{erfc}^{-1}(x)) = x

live ↗
Inerfc⁡(InverseErfc(x))\operatorname{erfc}(\mathrm{InverseErfc}(x))Outxx

erfc after its inverse cancels, but not the other way

live ↗
In[erfc⁡(InverseErfc(z)),InverseErfc(erfc⁡(z))]\bigl\lbrack\operatorname{erfc}(\mathrm{InverseErfc}(z)), \mathrm{InverseErfc}(\operatorname{erfc}(z))\bigr\rbrackOut[z,InverseErfc(erfc⁡(z))]\bigl\lbrack z, \mathrm{InverseErfc}(\operatorname{erfc}(z))\bigr\rbrack

The inverse is numeric at an exact rational

live ↗
InIsNumeric(InverseErfc(12))\mathrm{IsNumeric}(\mathrm{InverseErfc}(\frac{1}{2}))OutTrue\mathrm{True}
live ↗
InSolve(InverseErfc(x)2+InverseErfc(x)=1,x)\mathrm{Solve}(\mathrm{InverseErfc}(x)^2+\mathrm{InverseErfc}(x)=1, x)Out[erfc⁡(−51/2/2−12),erfc⁡(51/22−12)]\bigl\lbrack\operatorname{erfc}(-5^{1/2}/2-\frac{1}{2}), \operatorname{erfc}(\frac{5^{1/2}}{2}-\frac{1}{2})\bigr\rbrack
live ↗
InAttributes(InverseErfc)\mathrm{Attributes}(\mathrm{InverseErfc})Out[Listable,Protected]\bigl\lbrack\mathrm{Listable}, \mathrm{Protected}\bigr\rbrack
Possible issues #

Deep in the tail it keeps full precision, where erf⁡−1(1−s)\operatorname{erf}^{-1}(1 - s) would lose it

live ↗
InInverseErfc(1.0⋅10−10)\mathrm{InverseErfc}(1.0\cdot10^{-10})Out4.572 824 967 389 4854.572\,824\,967\,389\,485
About
Examples18
Checked againstWolfram Language 17 agree1 differSymPy 7 agree7 unevaluated1 errorRust 8 agree3 error
CrosswalkWolfram LanguageSymPyRust

Implementation

primitive · kernela kernel — an algorithm over mutable state that would not be readable as a tree

nativeenginetypescriptpackages/symbols/analysis/analytic/src/inverse-erfc.ts
mappedrustpackages/oracle/src/mappings.ts
mappedsympypackages/oracle/src/mappings.ts

See also: Erfc