Skip to contents

Element-wise atan2 operation.

Usage

nvl_atan2(lhs, rhs)

Arguments

lhs, rhs

(tensorish)
Tensorish values of data type floating-point. Must have the same shape.

Value

tensorish
Has the same shape and data type as the inputs. It is ambiguous if both inputs are ambiguous.

Implemented Rules

  • stablehlo

  • backward

StableHLO

Lowers to stablehlo::hlo_atan2().

See also

Examples

jit_eval({
  y <- nv_tensor(c(1, 0, -1))
  x <- nv_tensor(c(0, 1, 0))
  nvl_atan2(y, x)
})
#> AnvilTensor
#>   1.5708
#>   0.0000
#>  -1.5708
#> [ CPUf32{3} ]