Square Root method by subtraction

See inside

Returns digits of the float, not the float itself (ie. no decimal points).

Doesn't work with numbers whose square is an integer (9, 16, 25...)

Can accept float (non-whole-number) inputs.

No variables are used.

You can configure the precision inside (default = 15).

Notes and Credits


Initial step:

Let a = 5n (this multiplication by 5 is the only time when an operation other than addition and subtraction is involved!), and put b = 5.

Repeated steps:

(R1) If a ≥ b, replace a with a − b, and add 10 to b.

(R2) If a < b, add two zeroes to the end of a, and add a zero to b just before the final digit (which will always be ‘5’).


Then the digits of b approach more and more closely the digits of the square root of n.

Shared: 13 Sep 2016 Modified: 21 Dec 2016
Favorite this project 1
Love this project 1
Total views 10
View the remix tree  1
More projects by micycle2