Use my method: The natural algorithm
See the computational representation of the algorithm
Let $N$ be the number that we want to calculate its square root.
The square root of $N$ is calculated in two stages:
The first stage: finding the nearest real root of $N$:
We make $n=N$
- We subtract from $n$ the terms of $2x-1$ starting from $x=1$
- While $n>0$, we make $x=x+1$, and we proceed the substraction.
- When $n=0$, this stage stops and the number $N$ has a real square root of $x$.
- When $n<0$, this stage stops, the nearest real square root is $x-1$, and we continue the second stage to find the numbers after the comma.
The second stage: Finding the numbers after the comma:
Let $x$ be the nearest real square root of $N$
Let $b=N-x^2$
The following process is repeated for the number of digits we want to find after the comma:
We divide this process into 3 steps
Step 1: We multiply the number $x$ by ten, and we multiply the number $b$ by a hundred
Step 2: We assume $s=x$,
Step 3: We subtract $2s+1$ from $b$
- If the result of $b$ is greater than zero:
- we add to $s$ one, and continue from step 3.
- If the result of $b$ is less than zero:
- We make $i$ the number of subtractions in step 3, not counting the time that produced $b<0$
- In the space after the comma, we write the number $i$
- We get to b the quotient of $2s+1$
- We add to $x$ the number of subtractions $i$,
- We continue with the values of $x$ and $b$ from step 1 to find more numbers after the comma.
E.g.
A number with a real square root
$N=64; \sqrt[2]N=?$
We make $n=N$
- We subtract from n the terms of $2x-1$ starting from $x=1$
$x=1: n=64-(2x-1)=64-1=63$
$x=2: n=63-(4-1)=63-3=60$
$x=3: n=60-5=55$
$x=4: n=55-7=48$
$x=5: n=48-9=39$
$x=6: n=39-11=28$
$x=7: n=28-13=15$
$x=8: n=15-15=0$
- this stage stops and the number $N$ has a real square root of $x$.
$\sqrt[2]N=x; \sqrt[2]64=8$
E.g.
A number with an unreal square root
$N=122; \sqrt[2]N=?$
We make $n=N$
- We subtract from n the terms of $2x-1$ starting from $x=1$:
$x=1: n=122-(2x-1 )=122-1=121$
$x=2:n=121-(4-1)=121-3=118$
$x=3:n=118-5=113$
$...$
$x=10:n=41-19=22$
$x=11:n=22-21=1$
$x=12:n=1-23=-22$
- This stage stops, the nearest real square root is $x-1$, and we continue the second stage to find the numbers after the comma.
$$\sqrt[2]N=x-1; \sqrt[2]122≈12-1≈11$$
Let $x$ be the nearest real square root of $N$: $$x=11$$
Let $b=N-x^2$: $$b=N-x^2=122-121=1$$
1- Step 1: We multiply the number $x$ by ten, and we multiply the number $b$ by a hundred: $$x=x×10=110$$ $$b=b×100=100$$
2- Step 2: We assume $s=x$: $$s=110$$
3- Step 3: We subtract $2s+1$ from $b$
$b=b-(2s+1)=100-221=-121$
- As the result of $b$ is less than zero:
- We make $i$ the number of subtractions in step 3, not counting the time that produced $b<0$: $$i=0$$
- In the space after the comma, we write the number $i$: $$\sqrt[2]122≈11.0$$
- We get to $b$ the quotient of $2s+1$: $$b=100$$
- We add to $x$ the number of substractions $i$: $$x=x+0=110$$
- We continue with the values of $x$ and $b$ from step 1 to find more numbers after the comma.
4- Step 1: We multiply the number $x$ by ten, and we multiply the number $b$ by a hundred: $$x=x×10=1100$$ $$b=b×100=10000$$
5- Step 2: We assume $s=x$: $$s=1100$$
6- Step 3: We subtract $2s+1$ from $b$:
$b=b-(2s+1 )=10000-2201=7799…(i=1)$
- If the result of $b$ is greater than zero:
- we add to $s$ one, and continue from step 3
$s=s+1=1101: b=b-(2s+1)=7799-2203=5596…(i=2)$
$s=1102: b=5596-2205=3391…(i=3)$
$s=1103: b=3391-2207=1184…(i=4)$
$s=1104: b=1184-2209=-1025$
7- Step 1: We multiply the number $x$ by ten, and we multiply the number $b$ by a hundred: $$x=x×10=11040$$ $$b=b×100=118400$$
8- Step 2: We assume $s=x$: $$s=11040$$
9- Step 3: We subtract $2s+1$ from $b$:
$b=b-(2s+1)=118400-22081=96319…(i=1)$
- If the result of $b$ is greater than zero:
- we add to $s$ one, and continue from step 3
$s=s+1=11041: b=b-(2s+1)=96319-22083=74236…(i=2)$
$s=s+1=11042: b=b-(2s+1)=74236-22085=52151…(i=3)$
$s=s+1=11043: b=b-(2s+1)=52151-22087=30064…(i=4)$
$s=s+1=11044: b=b-(2s+1)=30064-22089=7975…(i=5)$
$s=s+1=11045: b=b-(2s+1)=7975-22091=-14116$
- As the result of $b$ is less than zero:
We make $i$ the number of subtractions in step 3, not counting the time that produced $b<0$: $$i=5$$
In the space after the comma, we write the number $i$: $$\sqrt[2]122≈11.045$$
We get to $b$ the quotient of $2s+1$: $$b=7975$$
We add to $x$ the number of substractions $i$: $$x=x+1=11045$$
We continue with the values of $x$ and $b$ from step 1 to find more numbers after the comma.
…
The answer to this question, based on the natural algorithm:
Let $N$ be the number you're calculating its square root,
Let $n$ be the limited unreal square root of N,
Let $i$ be the index of the digit you're trying to find after the comma ,
Put $$b=(N-n^2)(10^i)^2$$
Put $$s=n×10^i$$
- substract from $b$ the result of $2s+1$
- while $b>0$ add to $s$ one and continue the substraction.
- when $b<0$: the operation stops and the digit is the number of substractions, not counting the time that produced $b<0$
Computational representation of the algorithm in JavaScript:
https://codepen.io/am_trouzine/pen/ExoPmmy
Nth root calculation:
https://m.youtube.com/watch?v=uEpv6_4ZBG4&feature=youtu.be
My notes:
https://github.com/am-trouzine/Arithmetic-algorithms-in-different-numeral-systems/blob/master/Arithmetic%20algorithms%20in%20different%20numeral%20systems.pdf