Skip to contents

Element-wise error function erf(x) = (2 / sqrt(pi)) * integral_0^x exp(-t^2) dt.

Usage

nv_erf(x)

Arguments

x

(arrayish)
Input array.

Value

arrayish
Has the same shape and data type as the input.

See also

prim_erf() for the underlying primitive.

Examples

x <- nv_array(c(-1, 0, 1))
nv_erf(x)
#> AnvlArray
#>  -0.8427
#>   0.0000
#>   0.8427
#> [ CPUf32{3} ]