Re: mpz_gcdext bug in mini-gmp

2020-03-23 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > (I am not sure why MiniGMP uses the same internal field names as the > full GMP. Perhaps it should use different names to discourage > non-complying code?) I think the definition of mpz_t and struct __mpz_struct were simply copied verbatim. Renaming

Re: mpz_gcdext bug in mini-gmp

2020-03-23 Thread Torbjörn Granlund
Syed Jafri writes: Thank you for your help, I used the set macros and it works perfectly. We appreciate that you follow up with this all-is-fine message! The initial point of confusion for me was that the exact same code worked in gmp but not mini-gmp. The two might interpret the fields

Re: mpz_gcdext bug in mini-gmp

2020-03-23 Thread Torbjörn Granlund
ni...@lysator.liu.se (Niels Möller) writes: Never access internal fields of mpz_t directly. If for any reason (this example has no good reason, as far as I see) one needs to use a limb array as input, use mpz_roinit_n. I reacted about using Apple's infamous clang being used, but then I