# erfi

erfi(x)

Compute the imaginary error function of `x`, defined by \$-i \operatorname{erf}(ix)\$.

## Examples

1. Calculate the imaginary error function for a real number:

``````julia> erfi(2.5)
0.7457231257628999``````

This example computes the imaginary error function for the real number 2.5.

2. Evaluate the imaginary error function for a complex number:

``````julia> erfi(1 + 2im)
1.3161512816979478 + 0.482287973162673j``````

It calculates the imaginary error function for the complex number `1 + 2im`.

3. Use the imaginary error function in an expression:
``````julia> result = 2 * erfi(0.5) + erfi(1.5) - erfi(2.0)
0.2800658901948452``````

Here, the imaginary error function is used within an expression to compute the result.

Common mistake example:

``````julia> erfi("hello")
ERROR: MethodError: no method matching erfi(::String)``````

In this example, the input provided is not a valid argument for the `erfi` function. The function expects a numeric value as an argument. Make sure to pass a valid numeric input to the `erfi` function to avoid such errors.