The 'sqrt' function calculates the square root of 'expr' and returns this result.
(sqrt 1.0) ; returns 1 (sqrt 2.0) ; returns 1.41421 (sqrt 3.0) ; returns 1.73205 (sqrt 4.0) ; returns 2 (sqrt 5.0) ; returns 2.23607 (sqrt -1.0) ; error: square root of a negative number (sqrt 2) ; error: bad integer operation
Common Lisp: Common Lisp allows for integer numbers, which XLISP does not support for 'sqrt'.
See the
sqrt
function in the