ERFCX
The scaled complementary error function improves numerical stability for large positive arguments by multiplying \mathrm{erfc}(x) by e^{x^2}.
\mathrm{erfcx}(x)=e^{x^2}\,\mathrm{erfc}(x)
This wrapper evaluates \mathrm{erfcx}(x) for a scalar real argument using SciPy.
Excel Usage
=ERFCX(x)
x(float, required): Real argument for the scaled complementary error function (dimensionless).
Returns (float): Scaled complementary error function value at the input.
Example 1: Scaled complementary error function at zero
Inputs:
| x |
|---|
| 0 |
Excel formula:
=ERFCX(0)
Expected output:
1
Example 2: Scaled complementary error function at one
Inputs:
| x |
|---|
| 1 |
Excel formula:
=ERFCX(1)
Expected output:
0.427584
Example 3: Scaled complementary error function at two
Inputs:
| x |
|---|
| 2 |
Excel formula:
=ERFCX(2)
Expected output:
0.255396
Example 4: Scaled complementary error function at negative one
Inputs:
| x |
|---|
| -1 |
Excel formula:
=ERFCX(-1)
Expected output:
5.00898
Python Code
from scipy.special import erfcx as scipy_erfcx
def erfcx(x):
"""
Evaluate the exponentially scaled complementary error function.
See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfcx.html
This example function is provided as-is without any representation of accuracy.
Args:
x (float): Real argument for the scaled complementary error function (dimensionless).
Returns:
float: Scaled complementary error function value at the input.
"""
try:
x = float(x)
return float(scipy_erfcx(x))
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Real argument for the scaled complementary error function (dimensionless).