2021-07-23 00:02:40 +0100 | received badge | ● Famous Question (source) |
2021-07-23 00:02:40 +0100 | received badge | ● Notable Question (source) |
2020-09-05 09:15:03 +0100 | received badge | ● Famous Question (source) |
2020-09-05 09:15:03 +0100 | received badge | ● Notable Question (source) |
2019-07-12 06:57:00 +0100 | received badge | ● Notable Question (source) |
2018-03-08 12:42:59 +0100 | received badge | ● Popular Question (source) |
2018-01-23 00:29:20 +0100 | received badge | ● Popular Question (source) |
2017-06-09 19:45:53 +0100 | received badge | ● Popular Question (source) |
2015-11-01 04:19:28 +0100 | asked a question | Applying Memoized to Recursive Function Does anyone know how to apply memoized function to a recursive function? specifically the def f(xn) function in the following function? I am trying to improve the following code to be able to factor a numbers. It seems to work well for values like 7331116 and 7331118 but 7331117 results in a recursion depth error and I can't figure out how to improve the code. Someone suggested to me to memoize the def f(xn) function but all can find online is that you add @CachedFunction right before the function is declared but it doesn't seem to help. def pollard_Rho(n): print pollard_Rho(7331118) Fixed indentation. |
2015-10-12 08:05:02 +0100 | received badge | ● Student (source) |
2015-10-12 07:06:50 +0100 | asked a question | Can't Figure out how to Fix IndexError Based on Len() Can anyone help fix an error happening on the line "for i in range(1,len(sums)-1):"? I'm relevantly new to sage and more use to python but the few differences sage has I think have been taken into account but I can't figure out what is causing this IndexError.. Error: Does anyone have an idea of how to fix the IndexError I am running across? |
2015-10-12 06:44:49 +0100 | received badge | ● Scholar (source) |
2015-10-12 05:42:44 +0100 | received badge | ● Editor (source) |
2015-10-12 05:40:23 +0100 | asked a question | Can't find Cause of Traceback Error I'm trying to convert this code that runs in Python 2.7 to Sage but can't even get a hint from Sage at what line the code is not accepted by Sage. The only thing that Sage will report back is Traceback Error for SyntaxError: invalid syntax but no line information.. Can anyone tell where specifically the syntax is invalid?? |