erfe

Evaluates a scaled function related to erfc(z).

Synopsis

erfe (z)

Required Arguments

complex z (Input)
Complex argument for which the function value is desired.

Return Value

Complex scaled function value related to erfc(z).

Description

Function erfe is defined to be

\[e^{-z^2} \mathrm{erfc}(-iz) = -ie^{-z^2} \frac{2}{\sqrt{\pi}} \int_z^{\infty} e^{t^2} dt\]

Let b =machine(2) be the largest floating-point number. The argument z must satisfy

\[|z| \leq \sqrt{b}\]

or else the value returned is zero. If the argument z does not satisfy

\[(ℑz)^2  - (ℜz)^2 ≤ \log b,\]

then b is returned. All other arguments are legal (Gautschi 1969, 1970).

For more information, see the description for machine.

Example

In this example, erfe(2.5 +2.5i) is computed and printed.

from __future__ import print_function
from numpy import *
from pyimsl.math.erfe import erfe

z = 2.5 + 2.5j
value = erfe(z)
print("erfe(%2.3f + %2.3fi) = %2.3f + %2.3fi"
      % (z.real, z.imag, value.real, value.imag))

Output

erfe(2.500 + 2.500i) = 0.117 + 0.108i