EvgenyKarkan / EKAlgorithms

EKAlgorithms contains some well known CS algorithms & data structures.
MIT License
2.42k stars 362 forks source link

Fix for Issue #98 - [NSNumber primeNumbersFromSieveEratosthenesWithMaxNumber:] returns non-prime number (zero) #99

Closed shrtlist closed 8 years ago

shrtlist commented 8 years ago

Old result:

2016-02-21 06:16:09.696 EKAlgorithmsExamples[14912:30304784] Primes from sieve (
    0,
    2,
    3,
    5,
    7,
    11,
    13,
    17,
    19,
    23,
    29,
    31,
    37,
    41
)

New result:

2016-02-21 06:35:22.611 EKAlgorithmsExamples[89065:27228910] Primes from sieve (
    2,
    3,
    5,
    7,
    11,
    13,
    17,
    19,
    23,
    29,
    31,
    37,
    41
)