sqrt

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the sqrt of <number>
sqrt(<number>)
Summary

Returns the square root of a number.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
number

Any non-negative number, or an expression that evaluates to such a number.

Example
sqrt(9) -- returns 3
put sqrt(sideA^2 + sideB^2) into hypotenuseLength
Values
NameTypeDescription
return

The sqrt function returns a non-negative number.

RelatedOperator: ^
Function: exp, number
Glossary: return, non-negative, math operation
Control Structure: function
Description

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

The square root of a number is the number which must be squared to obtain number : sqrt(number)^2 is equal to number.

If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.

Tagsmath