math.sqrt

Full name
math.sqrt
Library
math
Syntax

math.sqrt(x)

Description

The math.sqrt function returns the square root of the number passed as an argument.

Parameters
  • x: Number whose square root you want to calculate.
Result

The math.sqrt function returns a real number, even if the decimal part of the result is zero.

Examples

Two examples of using the function are shown below:

math.sqrt(25)
5.0
math.sqrt(125)
11.180339887498949
Submitted by admin on Mon, 02/01/2021 - 09:47