New mpz_trial_division

Jason Moxham J.L.Moxham@maths.soton.ac.uk
Sat, 16 Nov 2002 10:16:04 +0000


How about these two new functions , this should satisfy everyone ?


unsigned long=20
mpz_exist_small_factor(mpz_srcptr N, unsigned long start, unsigned long s=
top)

returns r which is a factor of N between start and stop inclusive and not=
=20
trivial . or returns 0 if no such factor exists.


unsigned long=20
mpz_trial_div(mpz_srcptr N, unsigned long start, unsigned long stop)

returns r which is the smallest prime factor of N between start and stop=20
inclusive , or returns 0 if no such factor exists.
Precondition is that N is not divisible by any number from 2 to start-1