R/primitives.R
prim_log.Rd
Element-wise natural logarithm.
prim_log(x)
(arrayish) Arrayish value of data type floating-point.
arrayish
arrayish Has the same shape and data type as the input. It is ambiguous if the input is ambiguous.
stablehlo
quickr
reverse
Lowers to hlo_log().
hlo_log()
nv_log(), log()
nv_log()
log()
x <- nv_array(c(1, 2.718, 7.389)) prim_log(x) #> AnvlArray #> 0.0000 #> 0.9999 #> 2.0000 #> [ CPUf32{3} ]