Compartir a través de


SQRT( ) Function

Returns the square root of the specified numeric expression.

SQRT(nExpression)

Return Value

Numeric

Parameters

  • nExpression
    Specifies the numeric expression SQRT( ) evaluates. nExpression cannot be negative.

Remarks

The number of decimal places in the value returned by SQRT( ) is the larger of the current decimal place setting and the number of decimal places contained in nExpression. The current decimal place setting is specified with SET DECIMALS.

Example

CLEAR
? SQRT(4)  && Displays 2.00
? SQRT(2*SQRT(2))  && Displays 1.68

See Also

Reference

SET DECIMALS Command

COS( ) Function

SIN( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)