Returns the square root of the given expression.
Examples
Produces 3.
Produces approximately 1.414213.
REM Validate identity: SQR(x^2) = ABS(x)
x# = -7
PRINT "SQR("; x#; "^2) = "; SQR(x# * x#)
PRINT "ABS("; x#; ") = "; ABS(x#)
Notes
- Argument must be a non-negative real number.
- Passing a negative value results in an error.
- Return value is a real number.
- For arbitrary powers (including fractional), use POW.
See also: POW · EXP · ABS