ni...@lysator.liu.se (Niels Möller) writes: The gcd_21 loop takes inputs (u1, u0, v), inputs odd, and all the limbs non-zero. It is a much simpler loop than gcd_22
do { {u1, u0} <-- {u1, u0} - v (always > 0) if (u0 == 0) { u0 = u1; break; } shift out trailing zeros } while (u1 > 0) The result is then either v (if u1 = 0) or gcd_11(u0 >> cnt,v) where cnt needs to be computed here if gcd_11 only likes odd operands. -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel