Skip to contents

Element-wise log(1 + x), more accurate for small x.

Usage

prim_log1p(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

  • quickr

  • reverse

StableHLO

Lowers to stablehlo::hlo_log_plus_one().

See also

Examples

x <- nv_array(c(0, 0.001, 1))
prim_log1p(x)
#> AnvlArray
#>  0.0000
#>  0.0010
#>  0.6931
#> [ CPUf32{3} ]