erfi

inline Complex erfi(const Complex &z) noexcept

Evaluates the erfi function [1] for a complex input.

Parameters

const Complex &z

A complex number.

Returns

type Complex

A complex number.

The erfi, or imaginary error function, is closely related to the error function and is defined as:

\[\DeclareMathOperator\erfi{erfi} \erfi(z) = \frac{2}{\sqrt{\pi}} \int_{0}^{z}e^{t^2}dt\]

Example

Complex z = 1.0 + 1_j;
std::cout << erfi(z) << "\n";

Output:

0.190453 + 1.31615j

References