Skip to contents

Element-wise inverse error function (the inverse of erf on (-1, 1)).

Usage

prim_erf_inv(x)

Arguments

x

(arrayish)
One input. Can be any float data type. An R value materializes at its default data type.

Value

(arrayish)
Has the input's shape and data type.

Implemented Rules

  • stablehlo

  • reverse

StableHLO

Lowers to hlo_erf_inv(), an op of the CHLO dialect, a higher-level companion to StableHLO that is lowered to it during compilation. See chlo.erf_inv.

See also

Examples

# the input's data type carries through
x <- nv_array(c(-0.5, 0, 0.5))
prim_erf_inv(x)
#> AnvlArray
#>  -0.4769
#>   0.0000
#>   0.4769
#> [ CPUf32{3} ] 

# an R value materializes at its default data type
prim_erf_inv(0.5)
#> AnvlArray
#>  0.4769
#> [ CPUf32{} ]