Skip to contents

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

Usage

prim_erf(operand)

Arguments

operand

(arrayish)
Arrayish value of data type floating-point.

Value

arrayish
Has the same shape and data type as the input. It is ambiguous if the input is ambiguous.

Implemented Rules

  • stablehlo

  • reverse

StableHLO

Lowers to stablehlo::hlo_erf().

See also

Examples

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