You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//funkcia nastavi bitove pole, indexy maju hodnotu 0 pokial ide o prvocislo
void Eratosthenes(BitArray_t pole)
{
unsigned long i;
unsigned long j;
unsigned long q=(int)sqrt(BitArraySize(pole)); //cyklus s pevnym poctom opakovani ide do druhej odmocniny z pocrtu prvkov pola, dalej to je bezpredmetne
for (i=2;i<=q;i++)
{
if (GetBit(pole,i)==0)
for (j=2;(j*i)<(BitArraySize(pole));j++) //vyskrtavame nasobky z bitoveho pola