Karim Belabas on Thu, 08 May 2014 23:00:36 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Factoring small numbers


* Bill Allombert [2014-05-08 22:17]:
> On Thu, May 08, 2014 at 08:49:58PM +0200, Karim Belabas wrote:
> > * Jeroen Demeyer [2014-05-08 18:40]:
> > Benchmarking the factorization of a single small integer is not very
> > useful. Can you try a set of about 1000 "random" integers of the same
> > size ? (and share your benchmark code :-)
> > 
> > You can play with
> > 
> >   factor(a, n)   \\ that's for trial division
> >   factorint(a, combinations of flags 1/2/4/8)
> > 
> > to see if disabling particular factorization engines helps.
> 
> It does not.

(As I reported. Was just suggesting ways to investigate in case
something interesting turned up in Jeroen's bench.)

> Also
> \g3
> factorint(2131130266423999109,1)
> still call MPQS.

That's why I asked for 65-bit integers, since smaller integers are
delegated to factoru() which has not 'hint' argument and ignores
factorint flags.

Should be documented, but I've been of two minds with this; fixing the
discrepancy is not hard and might be better than documenting it. You
requested it a few times for bounded factorization ( factor(a,n) ) as well.

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`