Home

-Calculate Square Root-
Input:


Output:

<HTML>
<SCRIPT>
function main()
{
   var a = parseFloat(x.value);
   var b = a * 1000000000000000000;
   var c = 1;
   var d = 0;
   var e = 0;

   while (d < b)
   {
      while (d < b)
      {
         d = (e+c) * (e+c);
         c = c * 2;
      }
      e = c / 4 + e;
      d = e * e;
      c = 1;
   }

   y.value = e / 1000000000;
}
</SCRIPT>
<BODY>
<H2>
<CENTER>
<INPUT type="button" value="Compute" onClick="main();">
</CENTER>
-Calculate Square Root-
<HR>
Input:
<BR>
<INPUT id="x" type="text" size="20" value="45">
<BR>
<BR>
Output:
<BR>
<INPUT id="y" type="text" size="20" value="">
</BODY>
</HTML>