Timeline for Calculate the number of primes up to n
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 24, 2016 at 16:22 | comment | added | The Coder | @CoolestVeto, Ofcourse boolean[] is useless in sieve of Eratosthenes coz of the practical 1 byte (aka 8 bits) for a boolean value rather than the theoritical 1 bit memory. To overcome this, you've to use java.util.BitSet | |
| Mar 10, 2016 at 20:30 | comment | added | Dennis | I tried with sys.setrecursionlimit(2**31 - 1) (the highest possible value), but that's still a memory error. I don't think that's related to recursion anyway. A list of length 1,907,000,000 simply does not fit into my RAM (16 GiB). | |
| Mar 10, 2016 at 20:26 | comment | added | Dennis | OverflowError: signed integer is greater than maximum | |
| Mar 10, 2016 at 20:18 | comment | added | Zach Gates | Good catch! sys.maxsize in Python 3. Fixed it. @Dennis | |
| Mar 10, 2016 at 20:17 | history | edited | Zach Gates | CC BY-SA 3.0 | added 1 character in body |
| Mar 10, 2016 at 20:00 | comment | added | Dennis | AttributeError: 'module' object has no attribute 'maxint' | |
| Feb 29, 2016 at 17:35 | comment | added | mbomb007 | @VoteToClose Then don't use a Boolean array. Use an integer array and bit shifting/masking, with each bit representing a Boolean value. | |
| Feb 27, 2016 at 4:43 | comment | added | Zach Gates | Which cases? I believe I've fixed it. @Liam | |
| Feb 27, 2016 at 4:43 | history | edited | Zach Gates | CC BY-SA 3.0 | added 41 characters in body |
| Feb 27, 2016 at 1:57 | comment | added | Liam | memory error on the bigger cases. | |
| Feb 26, 2016 at 23:22 | comment | added | Addison Crump | It's the sieve! I couldn't use this in Java because it didn't like how much memory a boolean array used. D: | |
| Feb 26, 2016 at 23:20 | history | answered | Zach Gates | CC BY-SA 3.0 |