Skip to content

Commit 8d2687f

Browse files
committed
fixed error
1 parent 56cfe6d commit 8d2687f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/main/controlFlow/functions/functions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
If we assume, without loss of generality, that~$a>b$.
143143
Then, $c=a-b=(i-j)g$ and it will be clear that $c\bmod g=(a-b)\bmod g=(i-j)g\bmod g = 0$ as well, i.e., that $\pythonil{gcd}(a,b)=\pythonil{gcd}(a-b, b)=g$.
144144
Similarly, $d=a\bmod b=ig\bmod (jg)=ig-\lfloor i/j\rfloor*jg=g(i-j\lfloor i/j\rfloor)$ is still divisible by~$g$ without remainder as~$d\bmod g=0$.
145-
This means that~$\pythonil{gcd}(a\mbod b, b)=\pythonil{gcd}(a, b)=g$, too.
145+
This means that~$\pythonil{gcd}(a\bmod b, b)=\pythonil{gcd}(a, b)=g$, too.
146146

147147
Since both~$d$ and~$c$ are less than~$a$, we could replace~$a$ with either of them.
148148
In particular, $d$~will be less than both~$a$ and~$b$, so we could store~$b$ in~$a$ and replace~$b$ with~$d$.

0 commit comments

Comments
 (0)