Re: [mpir-devel] A new FFT for the New Year

2009-12-31 Thread Robert Gerbicz
Hi! How is it possible that to multiple longer numbers takes less time, for example: 12546048: 14.7s / 15.3s 13591552: 14.0s / 14.2s -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To post to this group, send email to mpir-de...@googlegroups.com

[mpir-devel] Re: new nextprime code

2009-11-14 Thread Robert Gerbicz
2009/11/15 William Stein > > On Sat, Nov 14, 2009 at 4:31 PM, gerrob wrote: > > > > I've uploaded a new code on google group. It is using remainder tree > > to speedup the sieving, and now it is sieving up to about log2(n)^2. > > It means a speedup by a factor of two for large "random" input (he

[mpir-devel] Re: mpz_probab_prime_p

2009-09-04 Thread Robert Gerbicz
2009/9/4 Cactus > > Looking quickly at the code, it seems that a version with sieving has > been written but it hasn't been tested or enabled. > In fact for large n values it would be faster to use more primes at sieve using a remainder tree instead of one expensive division for each prime, wha

[mpir-devel] Re: Merging Robert Gerbicz' perfect power code

2009-06-21 Thread Robert Gerbicz
Another improvement? would be: use a balanced tree, this is similar to the already posted my binary_splitting routine, that solves it in a recursive way to compute the product of lots of numbers, but since here we need the whole tree (to get the remainders) we can't follow exactly this recursive so

[mpir-devel] Re: Merging Robert Gerbicz' perfect power code

2009-06-21 Thread Robert Gerbicz
OK, I haven't known about that group, now I'm a member of that also. "I'm slightly confused. Isn't the first q of this form precisely q = 2p + 1? If so, it cannot be as large as your limit." See, we are searching for primes of the form q=2kp+1, if p is prime then it isn't sure that 2p+1 is also p

[mpir-devel] Re: Fast factorial code for large n value

2009-06-20 Thread Robert Gerbicz
2009/6/20 William Stein > > On Sat, Jun 20, 2009 at 12:52 AM, gerrob wrote: > > > > Hi! > > > > For factorial routine today I've written a fast solution that is > > faster for large n than gmp/mpir's currently code, if n is about 1 > > million or larger. > > > > For n=10^6: my code takes 1.7 sec.

[mpir-devel] Re: Fast wagstaff2.c code

2009-06-11 Thread Robert Gerbicz
2009/6/11 Jeff Gilchrist > > On Thu, Jun 11, 2009 at 1:00 PM, gerrob wrote: > > > I've uploaded a new code (wagstaff2.c) in google groups to test > > Wagstaff numbers by Anton Vrba's conjecture. It's faster than > > wagstaff.c from Jeff Gilchrist because I'm using bitshift+bitmask > > instead of

[mpir-devel] Re: Fast computation of binomial coefficients

2009-04-27 Thread Robert Gerbicz
> My feeling, looking through your code is that: > > * It really sits *on top of* the mpz layer > * It relies on some code for single limbs that is not abstracted > anywhere in MPIR, but should be > > It should: > > * be implemented *in* the new mpir_n layer > * the unsigned long portion should be

[mpir-devel] Re: Speedup the perfect power test

2009-04-22 Thread Robert Gerbicz
> > Do you have a canonical reference on the Strong Lehmer test. As a > number theorist, I should have heard of it, but to my embarrassment, I > have not! {blush} > > Look: http://mersennewiki.org/index.php/Pocklington%27s_Theorem in our case f=p. It doesn't mention, but in my number theory book it

[mpir-devel] Re: Speedup the perfect power test

2009-04-22 Thread Robert Gerbicz
2009/4/22 Cactus > > > > On Apr 22, 5:40 pm, gerrob wrote: > > Hi! > > > > I've written a much faster code than the currently used in gmp/mpir. > > Million of bits numbers can be tested in about 1 sec, but slower by a > > factor of 2 up to about 1000 bits numbers on my pc. Tested a lot, it > > s