Quick question about PP and PP_INVERTED defines
Marco Bodrato
bodrato at mail.dm.unipi.it
Sat Jun 18 17:32:39 CEST 2022
Ciao,
Il 2022-06-18 16:09 Torbjörn Granlund ha scritto:
> Brett Kuntz <kuntz at shaw.ca> writes:
> Since the first miller test is to
> base 2 and that the mod will always be an odd number I think I can
> make a custom function specifically for the miller base 2 test...
>
> I think a special modexp function for small bases could indeed be
> useful.
I agree. But, specifically for base 2, we already have some code.
It was not included in the last stable release, but it's in our
development repository since 2020 (as an internal function, mpn_2powm):
https://gmplib.org/repo/gmp/rev/63e53ddfd210 .
If you want to improve our code, I suggest to start from our latest
snapshot: https://gmplib.org/download/snapshot/gmp-next/ .
Ĝis,
m
More information about the gmp-discuss
mailing list