ni...@lysator.liu.se (Niels Möller) writes: Torbjorn Granlund <t...@gmplib.org> writes: > I notice you make this non-public. Is it premature to make it part of > the public interface? Pushed now, with declarations moved to gmp-h.in. And now some 450 nightly builds have run successfully.
I noticed one peculiarity when testing: for m = 1, mpz_invert considers every a uninvertible, while mpn_sec_minvert considers every a invertible, with inverse 0. The latter is consistent with gcd (a, 1) = 1 for all a. Not sure what the common mathematic convention is for the trivial ring Z_1 with only a single element, 0 (mod 1). According to http://en.wikipedia.org/wiki/Zero_ring element 0 is a unit. After all 0 * 0 = 1 ( = 0) which is precicely what ask for from an inverse. And since every integer is congruent to 0 in this ring, it seems that mpn_sec_minvert is right. Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel