- Function Cos(x)
Cos
Cos(
x ! (input) numerical expression
)
Arguments
- x
A scalar numerical expression in radians.
Return Value
The
Cos
function returns the cosine of x in the range \(-1\) to 1.
Graph
Example
_p_returnM1 := Cos(-p_pi); ! cos(-pi) = -1
_p_returnZ := Cos( 0 ); ! cos( 0 ) = 1
_p_returnP1 := Cos( p_pi); ! cos( pi) = -1
Note
The function Cos
can be used in constraints of nonlinear
mathematical programs.
See also
The functions
Sin
,Tan
,ArcCos
. Arithmetic functions are discussed in full detail in Arithmetic Functions of the Language Reference.