Darwin Help

Back to Index

cos

Function cos - the trigonometric function

Calling Sequence  cos(x)
Parameters
NameTypeDescription

x numerica number
Return Type  numeric
Synopsis This function computes the trigonometric cosine function. cos(x) has simple zeros at at x=Pi/2+n*Pi.
References Handbook of Mathematical Functions, M. Abramowitz and I. Stegun, Ch 4.3
Examples
> cos(0);
1
> cos(Pi/4);
0.7071
> cos(Pi/2);
6.123e-17
> cos(-Pi);
-1
See also arcsin,   arctan,   sin,   tan