Fix another bug in the modular inverse
This commit is contained in:
		| @ -146,7 +146,7 @@ return a cons of (x . y) such char x * N1 + y * N2 = GCD." | |||||||
| integer i such that (N * i) mod M = 1." | integer i such that (N * i) mod M = 1." | ||||||
|   (destructuring-bind (gcd (x . y)) |   (destructuring-bind (gcd (x . y)) | ||||||
|       (multiple-value-list (extended-gcd (if (minusp n) |       (multiple-value-list (extended-gcd (if (minusp n) | ||||||
|                                              (+ 26 n) |                                              (+ m n) | ||||||
|                                              n) |                                              n) | ||||||
|                                          m)) |                                          m)) | ||||||
|     (declare (ignorable y)) |     (declare (ignorable y)) | ||||||
|  | |||||||
| @ -62,7 +62,7 @@ return a cons of (x . y) such char x * N1 + y * N2 = GCD." | |||||||
| integer i such that (N * i) mod M = 1." | integer i such that (N * i) mod M = 1." | ||||||
|   (destructuring-bind (gcd (x . y)) |   (destructuring-bind (gcd (x . y)) | ||||||
|       (multiple-value-list (extended-gcd (if (minusp n) |       (multiple-value-list (extended-gcd (if (minusp n) | ||||||
|                                              (+ 26 n) |                                              (+ m n) | ||||||
|                                              n) |                                              n) | ||||||
|                                          m)) |                                          m)) | ||||||
|     (declare (ignorable y)) |     (declare (ignorable y)) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user