Skip to content

Commit 5365446

Browse files
committed
updating euclidean_algorithm.md
1 parent 817d2bc commit 5365446

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contents/euclidean_algorithm/euclidean_algorithm.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
3939
[import:1-10, lang="julia"](code/julia/euclidean.jl)
4040
{% sample lang="nim" %}
4141
[import:13-24, lang="nim"](code/nim/euclid_algorithm.nim)
42-
{% sample lang="x86asm" %}
43-
[import:43-78, lang="x86asm"](code/x86asm/euclidean_example.asm)
42+
{% sample lang="x64" %}
43+
[import:43-78, lang="x64"](code/x64/euclidean_example.s)
4444
{% endmethod %}
4545

4646
Here, we simply line the two numbers up every step and subtract the lower value from the higher one every timestep. Once the two values are equal, we call that value the greatest common divisor. A graph of `a` and `b` as they change every step would look something like this:
@@ -86,8 +86,8 @@ Modern implementations, though, often use the modulus operator (%) like so
8686
[import:12-25, lang="julia"](code/julia/euclidean.jl)
8787
{% sample lang="nim" %}
8888
[import:1-11, lang="nim"](code/nim/euclid_algorithm.nim)
89-
{% sample lang="x86asm" %}
90-
[import:8-41, lang="x86asm"](code/x86asm/euclidean_example.asm)
89+
{% sample lang="x64" %}
90+
[import:8-41, lang="x64"](code/x64/euclidean_example.s)
9191
{% endmethod %}
9292

9393
Here, we set `b` to be the remainder of `a%b` and `a` to be whatever `b` was last timestep. Because of how the modulus operator works, this will provide the same information as the subtraction-based implementation, but when we show `a` and `b` as they change with time, we can see that it might take many fewer steps:
@@ -138,8 +138,8 @@ The Euclidean Algorithm is truly fundamental to many other algorithms throughout
138138
[import, lang="julia"](code/julia/euclidean.jl)
139139
{% sample lang="nim" %}
140140
[import, lang="nim" %](code/nim/euclid_algorithm.nim)
141-
{% sample lang="x86asm" %}
142-
[import, lang="x86asm"](code/x86asm/euclidean_example.asm)
141+
{% sample lang="x64" %}
142+
[import, lang="x64"](code/x64/euclidean_example.s)
143143
{% endmethod %}
144144

145145

0 commit comments

Comments
 (0)