Function ArcCos(x)

ArcCos

ArcCos(
      x             ! (input) numerical expression
      )

Arguments

x

A scalar numerical expression in the range \([-1,1]\).

Return Value

The ArcCos function returns the arccosine of x in the range 0 to \(\pi\) radians.

Graph

../../_images/arccos.png

Example

_p_returnM1 := arcCos(-1); ! returns pi
_p_returnZ  := arcCos( 0); ! returns half pi
_p_returnP1 := arcCos( 1); ! returns 0

Note

  • A run-time error results if x is outside the range \([-1,1]\).

  • The function ArcCos can be used in constraints of nonlinear mathematical programs.

See also