# COS()

## Effect

Returns the cosine of a variable in radians.

## Syntax

`COS(<Number>)`

## Parameter

`<Number>` can be a value, a numeric variable or an expression.

## Example

```basic
10 D1 = ATN(1)*8/360
20 PRINT "The cosine of a 45 degree angle is ";COS(45*D1)
30 PRINT "The cosine of a 0 degree angle is ";COS(0)
 
RUN
The cosine of a 45 degree angle is .70710678118655
The cosine of a 0 degree angle is 1
```

## Related to

`ATN()`, `SIN()`, `TAN()`

## Compatibility

MSX-BASIC 1.0 or higher

## Source

Retrieved from "https://www.msx.org/wiki/COS()"
