Skip to contents

Element-wise cosine.

Usage

nvl_cosine(operand)

Arguments

operand

(tensorish)
Tensorish value of data type floating-point.

Value

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

Implemented Rules

  • stablehlo

  • backward

StableHLO

Lowers to stablehlo::hlo_cosine().

See also

Examples

jit_eval({
  x <- nv_tensor(c(0, pi / 2, pi))
  nvl_cosine(x)
})
#> AnvilTensor
#>   1.0000e+00
#>  -4.3711e-08
#>  -1.0000e+00
#> [ CPUf32{3} ]