2022-11-04 16:38:29 +0200 | received badge | ● Notable Question (source) |
2019-01-24 14:51:16 +0200 | received badge | ● Taxonomist |
2016-12-13 11:00:00 +0200 | received badge | ● Popular Question (source) |
2012-12-14 06:38:44 +0200 | commented answer | Why does list(primes(2,10)) behave different from [2,3,5,7]? Thanks, that's it. It also explains why the result for different p was the same whereas the math says it can't be equal. |
2012-12-14 06:36:52 +0200 | marked best answer | Why does list(primes(2,10)) behave different from [2,3,5,7]? One difference between gives This will affect due to truncating division: 1/2 gives 1/2 in QQ in Sage, but 0 in Python. (Note that I had to use the Python-loaded version of the function so that Sage's preparser didn't wrap the I can't reproduce a MemoryError but I only have 5.5 at hand. Using |
2012-12-14 06:36:52 +0200 | received badge | ● Scholar (source) |
2012-12-13 11:21:26 +0200 | received badge | ● Student (source) |
2012-12-13 10:57:27 +0200 | asked a question | Why does list(primes(2,10)) behave different from [2,3,5,7]? I'm trying to run the following code: http://pastebin.com/UrBHRxr7 I experience a very strange behaviour. With this code I'll hit a memory limit even for the first integral that is being calculated. If I comment out line 17 and use line 16 instead (so What could be the source for this? How can I rewrite the code so that I can use parameters instead of a hard-coded list? I'm using Sage Version 4.8, Release Date: 2012-01-20. |