Skip to contents

Element-wise cosine. You can also use cos().

Usage

nv_cosine(operand)

Arguments

operand

(arrayish)
Operand.

Value

arrayish
Has the same shape and data type as the input.

See also

prim_cosine() for the underlying primitive.

Examples

x <- nv_array(c(0, pi / 2, pi))
cos(x)
#> AnvlArray
#>   1.0000e+00
#>  -4.3711e-08
#>  -1.0000e+00
#> [ CPUf32{3} ]