**sqrt Function :-**

Returns the square root of a number.

**Suntax :-**

sqrt(number)

**Description :-**

If the value of

**is negative,**

`number`

**returns**

`sqrt`

**. Because**

`NaN`

**is a static method of**

`sqrt`

**,you always use it as**

`Math`

**, rather than as a method of a**

`Math.sqrt()`

**object you created.**

`Math`

**Example:**

<html>

<head>

<title>Calculate Squareroot</title>

<script language="javascript">

function calcsqrt()

{

var value=f1.sqrt.value;

alert("The Squareroot of " + value + " is " + Math.sqrt(value));

}

</script>

</head>

<body>

<form name="f1">

<input type="text" name="sqrt" value="Enter Number" size="20">

<input type="button" value="Calculate" onclick="calcsqrt()">

</form>

</body>

</html>

i have to know that which formula they used in to the sqrt() method

ReplyDeleteso if you know so please tell me

I like the helpful information you supply for

ReplyDeleteyour articles. I will bookmark your weblog and check once more right here frequently.

I'm reasonably sure I will be informed lots of new stuff

right right here! Best of luck for the following!

Also visit my blog - Investing Work