Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
SQRT Function (DataBasic) (m618703+sqrt_f.htm)
Calculates the square root of an expression.
SQRT(expression)
expression is any DataBasic expression that evaluates to a numeric value greater than or equal to zero.
If expression evaluates to a negative number, SQRT returns zero and a warning message is displayed.
If there is no PRECISION statement in the program, the value is returned rounded to the nearest four decimal places. Otherwise, the number of decimal places returned is as specified by the PRECISION statement.
In each case, the significant decimal places returned are the result of rounding. However, only up to five places are significant: if the PRECISION statement specifies a precision greater than five, trailing zeroes are appended to the five significant places so as to return the numbers of places specified.
X = "64" Y = SQRT(X)
Assigns the value 8 (the square root of 64) to variable Y.
C = SQRT(A*A + B*B)
Finds the hypotenuse of a right-angled triangle and assigns the value to variable C.