ni...@lysator.liu.se (Niels Möller) writes: > It shouldn't be too hard to rewrite randseed_mt to use mpn_powm, right? > Which probably didn't exist when the original version was written.
Or if we want to take advantage of the structure, we need an mpn function to reduce numbers modulo 2^19937 - 20023. The input seed is of arbitrary size, right? How important is support for other limbsizes than 32 and 64 bits? We'd need special code to support artificially small limbs, where 20023 doesn't fit in a limb. Perhaps it's good enough to have special code for 32 and 64 bits, and fall back to mpn_powm for other sizes. And then test that all variants produce the same results. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs