Class Prime::EratosthenesSieve
In: lib/backports/1.9.1/stdlib/prime.rb
Parent: Object

Internal use. An implementation of eratosthenes‘s sieve

Methods

next_to  

Included Modules

Singleton

Constants

BITS_PER_ENTRY = 16
NUMS_PER_ENTRY = BITS_PER_ENTRY * 2
ENTRIES_PER_TABLE = 8
NUMS_PER_TABLE = NUMS_PER_ENTRY * ENTRIES_PER_TABLE
FILLED_ENTRY = (1 << NUMS_PER_ENTRY) - 1

Public Instance methods

returns the least odd prime number which is greater than n.

[Validate]