flintlib / flint

FLINT (Fast Library for Number Theory)
http://www.flintlib.org
GNU Lesser General Public License v3.0
429 stars 242 forks source link

Refactor some tests #1944

Closed albinahlback closed 4 months ago

albinahlback commented 5 months ago

Big note: I removed n_cbrt_newton_iteration, as I have no idea why this slower and very specific function should exist.

Inlined n_randint to enable remainders by limits known at compile time to be reduced to multiplications or and-operations.

Refactored a lot of test, and revised the number of iterations that had to be done. I think 10000 iterations is the maximum test coefficient we have to employ. More than this is just redundant for more test purposes.

Improved(?) fmpz_randprime and its test (the test doesn't have to be very thorough as it's based on n_randprime and fmpz_nextprime).

Changed every instance of __mpz_struct * to mpz_ptr.

albinahlback commented 5 months ago

Oh yeah, fixing bugs dating back to prehistoric times :sunglasses: