Raúl Merino on Fri, 30 Dec 2005 19:05:19 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
The problem is here: |
The problem is in the last phrase, in the while. I want that the variable primers are a vector of GEN. I don't want 2^500 primes, i only want a prime x between 2^508 and 2^512. It's a size to big for a variable of C. //reservem memòria per les variables del PARI elevado=cgeti(BITS_IN_LONG); aux_pari=cgeti(DEFAULTPREC); p=cgeti(BITS_IN_LONG); j_aux=cgeti(BITS_IN_LONG); min_bits=cgeti(DEFAULTPREC); primers=cgetg(100, t_INT); for(k=1; k<100; k++) primers[k]=lgeti(BITS_IN_LONG); aux_pari=stoi((long) 2); min_bits=stoi((long) min_bits); //primers is a vector who have components <=2^512 //p is a integer <2^512 f=1; control=(int) f; for(a=0; a<=maxposlloc-2; a++) { if(a!=1) maxposlongitud=posicio_aux; while(itos(geq((GEN) primers[a], stoi(0)))==1) Thanks for all. Raúl _________________________________________________________________Descubre la descarga digital con MSN Music. Más de medio millón de canciones. http://music.msn.es/