sqrt()
Purpose
Find the square root of the specfied number
Description
The mathematical square root function which is the number which when multiplied by itself will give you the specfied number. If you try to find the square root of a negative number it will return nan (not a number)
Syntax
result = sqrt( number )
Arguments
number number to find the square root of
result square root of the number
Example
// Pythagoras: for a right angled triangle with side lengths a,b and c (where c is the longest side) a*a + b*b = c*c
a = 3
b = 4
c = sqrt( a * a + b * b )
print( "c = ", c )
update()
sleep( 3 )
Associated Commands