Reference sqrt()

sqrt()

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.
Notice any errors or typos? Please let us know. Please feel free to edit src/math/calculation.js and open a pull request!

Related References