ERFI
The imaginary error function is defined through the standard error function by analytic continuation and is commonly used in wave and plasma integrals.
\mathrm{erfi}(x)=-i\,\mathrm{erf}(ix)
This wrapper evaluates \mathrm{erfi}(x) for a scalar real argument using SciPy.
Excel Usage
=ERFI(x)
x(float, required): Real argument for the imaginary error function (dimensionless).
Returns (float): Imaginary error function value at the input.
Example 1: Imaginary error function at zero
Inputs:
| x |
|---|
| 0 |
Excel formula:
=ERFI(0)
Expected output:
0
Example 2: Imaginary error function at one half
Inputs:
| x |
|---|
| 0.5 |
Excel formula:
=ERFI(0.5)
Expected output:
0.614952
Example 3: Imaginary error function at one
Inputs:
| x |
|---|
| 1 |
Excel formula:
=ERFI(1)
Expected output:
1.65043
Example 4: Imaginary error function at negative one
Inputs:
| x |
|---|
| -1 |
Excel formula:
=ERFI(-1)
Expected output:
-1.65043
Python Code
from scipy.special import erfi as scipy_erfi
def erfi(x):
"""
Evaluate the imaginary error function for a real input.
See: https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfi.html
This example function is provided as-is without any representation of accuracy.
Args:
x (float): Real argument for the imaginary error function (dimensionless).
Returns:
float: Imaginary error function value at the input.
"""
try:
x = float(x)
return float(scipy_erfi(x))
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Real argument for the imaginary error function (dimensionless).