Ver código fonte

Add code for euclid's algo

Lily Carpenter 9 anos atrás
pai
commit
15d2ed6fbc
2 arquivos alterados com 28 adições e 0 exclusões
  1. 27 0
      chapter-1/euclid.lisp
  2. 1 0
      chapter-1/notes.org

Diferenças do arquivo suprimidas por serem muito extensas
+ 27 - 0
chapter-1/euclid.lisp


+ 1 - 0
chapter-1/notes.org

@@ -1,4 +1,5 @@
1 1
 * Euclid's algorithm (Page 2-9)
2
+** Calculates the greatest common divisor of two numbers.
2 3
 ** Definition
3 4
 *** E0. [Ensure m >= n.] If m < n, exchange m <-> n.
4 5
 *** E1. [Find remainder.] Divide m by n and let r be the remainder.