sqrt
- Square root of a number
x : | RealPos (pass by const reference) |
A number. |
# compute the square root of a real number
x <- 3.0
root <- sqrt(x)
if ( abs(root*root - x) > 1.0e-15) {
print("Problem computing the square root.")
} else {
print("Correct computation of the square root.")
}