primorial(negative)

paul zimmermann Paul.Zimmermann at inria.fr
Fri Nov 13 13:03:33 UTC 2015


       Marco,

> > efficiency: the GMP program below takes 1.5 seconds on my computer
> > to loop over all primes up to 10^6:
> 
> I see.
> 
> > sage: for p in prime_range(10^6):
> > ....:     s += 1
> > ....: print s, cputime(t)
> 
> Where, in the interface you proposed for GMP, do you set the upper-limit 
> 10^6, that you gave to sage?

no, if possible.

> We should think carefully before we decide to add a new type, should we 
> focus on primes or on sieves? Shall the range always start from zero? 
> Shall we really loop on mpz? Maybe we prefer a function that fills an 
> array?

I agree there are several questions to answer, I did only answer your
question "Suggestions for the interface?"...

Paul


More information about the gmp-discuss mailing list