# All Science Fair Projects

## Science Fair Project Encyclopedia for Schools!

 Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary

# Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

# Integer square root

In number theory (a branch of mathematics), the integer square root (isqrt) of a positive integer n is the positive integer m which is the greatest integer less than or equal to the square root of n,

$\mbox{isqrt}( n ) = \lfloor \sqrt n \rfloor.$
 Contents

## Algorithm

To calculate √n, and in particular, isqrt(n), one can use Newton's method for the equation x2 - n = 0, which gives us the recursive formula

${x}_{k+1} = \frac{1}{2}\left(x_k + \frac{ n }{x}_{k}\right), \ k \ge 0.$

One can choose for example x0 = n as initial guess.

The sequence {x k} converges quadratically to √n as k→∞. It can be proved (the proof is not trivial) that one can stop as soon as

| xk + 1xk | < 1

to ensure that $\lfloor x_{k+1} \rfloor=\lfloor \sqrt n \rfloor.$

## Domain of computation

Let us note that even if √n is irrational for most n, the sequence {x k} contains only rational terms. Thus, with Newton's method one never needs to exit the field of rational numbers in order to calculate isqrt(n), a fact which has some theoretical advantages in number theory.

## Stopping criterion

One can prove that c = 1 is the largest possible number for which the stopping criterion

| xk+1xk | < c

ensures $\lfloor x_{k+1} \rfloor=\lfloor \sqrt n \rfloor$ in the algorithm above.

Since actual computer calculations involve roundoff errors, one needs to use c < 1 in the stopping criterion, e.g.,

| xk+1xk | < 0.5.

## See also

Last updated: 10-18-2005 15:24:33
03-10-2013 05:06:04
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price \$ is not everything. Quality does matter.
 Science Fair Coach What do science fair judges look out for? ScienceHound Science Fair Projects for students of all ages
 All Science Fair Projects.com Site All Science Fair Projects Homepage Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice