# cosd

cosd(x)

Compute cosine of `x`, where `x` is in degrees

## Examples

``````julia> cosd(45)
0.7071067811865476``````

This example calculates the cosine of 45 degrees using the `cosd` function. The result is approximately 0.7071067811865476.

``````julia> angle = 60
julia> cosd(angle)
0.5000000000000001``````

Here, we assign the value 60 to the variable `angle` and then calculate the cosine of `angle` using `cosd`. The result is approximately 0.5000000000000001.

``````julia> angles = [30, 45, 60, 90]
julia> cosd.(angles)
4-element Array{Float64,1}:
0.8660254037844387
0.7071067811865476
0.5000000000000001
6.123233995736766e-17``````

In this example, we have an array of angles `[30, 45, 60, 90]`. We use the broadcasting syntax `cosd.(angles)` to calculate the cosine of each angle in the array. The resulting array contains the cosine values for each angle.

Common mistake example:

``````julia> cosd(90)
6.123233995736766e-17``````

Sometimes, users expect the cosine of 90 degrees to be exactly zero. However, due to floating-point precision, the result is a very small number close to zero. It's important to be aware of these precision limitations when working with trigonometric functions in Julia.