Function Sqrt(x)

Sqrt

Sqrt(
    x             ! (input) numerical expression
    )

Arguments

x

A scalar numerical expression in the range \([0,\infty)\).

Return Value

The function Sqrt returns the \(\sqrt{x}\).

Graph

../../_images/sqrt.png

Example

_p_returnA := Sqrt( 0    ); ! Sqrt(  0 ) = 0
_p_returnB := Sqrt( 1    ); ! Sqrt(  1 ) = 1
_p_returnC := Sqrt( p_pi ); ! Sqrt(  π ) = 1.772453850906
_p_returnD := Sqrt( 10   ); ! Sqrt( 10 ) = 3.162277660168

Note

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

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

See also