If the GCD computation was trivial, then the state still contains
references to the constants `MP_ZERO' and `MP_ONE'. It would be Really Bad
to trash their signs -- in particular, this causes comparisons with
`MP_ONE' to fail, leading to an assertion failure from `mp_modinv'.
/* --- Twiddle the signs --- */
- if (f & f_aneg)
- x->f ^= MP_NEG;
- if (f & f_bneg)
- y->f ^= MP_NEG;
+ if (f & f_aneg) { MP_SPLIT(x); x->f ^= MP_NEG; }
+ if (f & f_bneg) { MP_SPLIT(y); y->f ^= MP_NEG; }
/* --- Store the results --- */
5 9 2;
15 64 47;
564566436 546457643 408896426;
+ -1 257 -1;
}
jacobi {