# Function Reference

# Sqrt

Calculates the square-root of a number.

Sqrt ( expression )

## Parameters

expression | Any nonnegative expression to get the square-root of.

## Return Value

Success: | the square-root.
Failure: | -1.#IND if parameter is negative.

## Remarks

To compute an nth root, use the power operator: x ^ (1/n)
MsgBox(4096,"The cube root of 27 is", 27 ^ (1/3) )

## Example

    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        ; Assign a Local variable the square-root of 2.
        Local $fSqrt1 = Sqrt(2)

        ; Display the result.
        MsgBox($MB_SYSTEMMODAL, "", $fSqrt1)

        ; Assign a Local variable the square-root of 9.
        Local $fSqrt2 = Sqrt(9)

        ; Display the result.
        MsgBox($MB_SYSTEMMODAL, "", $fSqrt2)
    EndFunc   ;==>Example