Skip to contents

mlx_erf() computes the error function elementwise. mlx_erfinv() computes the inverse error function elementwise.

Usage

mlx_erf(x)

mlx_erfinv(x)

Arguments

x

An mlx array.

Value

An mlx array with the result.

Examples

x <- as_mlx(c(-1, 0, 1))
mlx_erf(x)
#> mlx array [3]
#>   dtype: float32
#>   device: gpu
#>   values:
#> [1] -0.8427008  0.0000000  0.8427008
p <- as_mlx(c(-0.5, 0, 0.5))
mlx_erfinv(p)
#> mlx array [3]
#>   dtype: float32
#>   device: gpu
#>   values:
#> [1] -0.4769363  0.0000000  0.4769363