Calculates the square root of a number.
A number's square root can be multiplied by itself to produce the original number. For example, sqrt(9)
returns 3 because 3 × 3 = 9. sqrt()
always returns a positive value. sqrt()
doesn't work with negative arguments such as sqrt(-9)
.
Examples
Syntax
sqrt(n)
Parameters
n
non-negative number to square root.
Notice any errors or typos? Please let us know. Please feel free to edit src/math/calculation.js and open a pull request!