Function Sqr(x)

Sqr

Sqr(
    x             ! (input) numerical expression
    )

Arguments

x

A scalar numerical expression.

Return Value

The function Sqr returns \(x^2\).

Graph

../../_images/sqr.png

Example

_p_returnA := Sqr( 0    ); ! Sqr(  0 ) = 0
_p_returnB := Sqr( 1    ); ! Sqr(  1 ) = 1
_p_returnC := Sqr( p_pi ); ! Sqr(  π ) = 9.869604401089
_p_returnD := Sqr( 10   ); ! Sqr( 10 ) = 100

Note

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

See also

The functions Power, Cube, and Sqrt. Arithmetic functions are discussed in full detail in Arithmetic Functions of the Language Reference.