# erfinv

erfinv(x)

Compute the inverse error function of a real `x`, defined by \$\operatorname{erf}(\operatorname{erfinv}(x)) = x\$.

## Examples

1. Compute the inverse error function:

``````julia> erfinv(0.5)
0.47693627620446995``````

This example computes the inverse error function of `0.5` using the `erfinv` function.

2. Inverse error function of a negative value:

``````julia> erfinv(-0.2)
-0.17914345462129104``````

It calculates the inverse error function of `-0.2`.

3. Compute the inverse error function of an array:
``````julia> x = [-0.5, 0.3, 0.8];
julia> erfinv.(x)
3-element Array{Float64,1}:
-0.47693627620446995
0.2724627147267544
0.9061938024368232``````

This example uses broadcasting to compute the inverse error function for each element in the array `x`.

Common mistake example:

``````julia> erfinv("abc")
ERROR: MethodError: no method matching erfinv(::String)``````

In this example, the input to `erfinv` is not a valid argument. The `erfinv` function expects a real number as input, not a string. Make sure to provide a valid input to the `erfinv` function for correct results.