Anytime humans are involved mistakes will be made. Where I work when something goes down it's a total panic and later it always has to be someone's fault. Sure lends itself to lots of CYA and working scared.
Maybe someone can help me understand a bit better. The author talks about how slow a recursive algorithm is, but the "fast doubling" implementation itself uses recursion. Would not the same slower effect be felt by this implementation due to its use of recursion?
Agreed, this response is exactly correct. I didn't realize that my wording of "slow recursion" could be misread as "every recursion is slow", which is not true - especially because every iterative procedure can be expressed as a recursive procedure with the same time complexity.
As a side note, the Java and C# implementations of the "fast doubling" algorithm actually used a fixed number of loop iterations instead of the mathematical recursive formula.
every iterative procedure can be expressed as a recursive procedure.
To use Ableson's precise language:
Every iterative procedure can be expressed as
a recursive *definition.*
SICP is written to carefully avoid overloading terms: "Function" is reserved for mathematical functions and "closure" is reserved for algebraic closure.
To use the language of Ableson and Sussman in Structure and Interpretation of Computer Programs [node 15]:
The fast doubling algorithm has a recursive definition and produces a logarithmic procedure.
The classic implementation based on the mathematical definition:
def F(n):
if n == 0: return 0
elif n == 1: return 1
else: return F(n-1)+F(n-2)
Has a recursive definition and produces a recursive procedure [even worse the recursive procedure runs in exponential time]. It is also possible to create a recursive definition of a procedure that runs in linear time.
"This is a full-time position based in EFF's office in San Francisco, CA. Inquiries about whether this job can be done remotely or part-time will not be answered. No phone calls please!"
The only people who are restricted from reading classified documents are those who hold government security clearances. Folks who haven't bound themselves to that particular machine cannot be told what they can and cannot read.