0

sqrt

To calculate the square root

Use the function to find the square root of a positive number.

đź’ˇ If the number has a negative sign, use the function abs() for example to convert it to a positive number first.

Syntax

sqrt(number)

Return

number

Example

sqrt(x) To calculate the square root of a number x.

sqrt(3)

Result: 1.7320508075688772

 

sqrt(9)

Result: 3

 

sqrt(-9)

Result: (invalid)

 

sqrt(abs(9 - 13))

Result: 2

See also

abs, which returns the absolute value of a number

sqr which calculates the square of a number.

Reply

null