projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug which failed to favour `x' when `y' wasn't wanted and the two
[u/mdw/catacomb]
/
mp-gcd.c
diff --git
a/mp-gcd.c
b/mp-gcd.c
index
8298698
..
19192f5
100644
(file)
--- a/
mp-gcd.c
+++ b/
mp-gcd.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mp-gcd.c,v 1.
1 1999/11/17 18:02:1
6 mdw Exp $
+ * $Id: mp-gcd.c,v 1.
2 1999/11/22 20:49:5
6 mdw Exp $
*
* Extended GCD calculation
*
*
* Extended GCD calculation
*
@@
-30,6
+30,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-gcd.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-gcd.c,v $
+ * Revision 1.2 1999/11/22 20:49:56 mdw
+ * Fix bug which failed to favour `x' when `y' wasn't wanted and the two
+ * arguments needed swapping.
+ *
* Revision 1.1 1999/11/17 18:02:16 mdw
* New multiprecision integer arithmetic suite.
*
* Revision 1.1 1999/11/17 18:02:16 mdw
* New multiprecision integer arithmetic suite.
*
@@
-223,6
+227,7
@@
void mp_gcd(mp **gcd, mp **xx, mp **yy, mp *a, mp *b)
if (ext) {
if (swap) {
mp *t = x; x = y; y = t;
if (ext) {
if (swap) {
mp *t = x; x = y; y = t;
+ t = a; a = b; b = t;
}
if (yy) {
if (y->f & MP_NEG) {
}
if (yy) {
if (y->f & MP_NEG) {