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
Number:
non-negative number to square root.
Returns
Number: square root of number.
This page is generated from the comments in src/math/calculation.js . Please feel free to edit it and submit a pull request!