Re: Inconsistent definitions of millerrabin() argument types

2024-03-25 Thread marco . bodrato
Ciao,

24 mar 2024, 10:59 da cas...@gmail.com:

> Hi,
>
> In millerrabin.c, there are conflicting definitions for millerrabin().
>
> The prototype is:
>
I removed the prototype, by swapping the function order :-)
Thanks.
m
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Inconsistent definitions of millerrabin() argument types

2024-03-24 Thread Case Van Horsen
Hi,

In millerrabin.c, there are conflicting definitions for millerrabin().

The prototype is:

static int millerrabin (mpz_srcptr,
mpz_ptr, mpz_ptr,
mpz_srcptr, unsigned long int);

while the actual function is:

static int
millerrabin (mpz_srcptr n, mpz_ptr x, mpz_ptr y,
 mpz_srcptr q, mp_bitcnt_t k)

I found this with an experimental build of GMP with mp_bitcnt_t defined as
"long long" instead of "long". I understand this is not triggered by an
unpatched version of GMP but it probably should be fixed for correctness.

Regards,
casevh
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs