Sqr

sqr returns the square root of a number.

Syntax

   sqr(EXPR_NUM)

Examples

   SQR_2=sqr(2)

   # Solves A*X^2+B*X+C=0 with real values
   DET=B*B-4*A*C
   If DET>0
     SOLUTION_1 = (-B +sqr(DET))/(2*A)
     SOLUTION_2 = (-B -sqr(DET))/(2*A)
   Endif

Description

sqr(X) returns the positive number whose square is X.

The type of result is Double.

Associated errors

Error codeDescription
10The argument is not numeric.
11The argument is strictly negative.

See also

log, ln.