Post Reply 
Fibonacci sequence by recursive algorithm fail
04-23-2015, 02:21 AM
Post: #15
RE: Fibonacci sequence by recursive algorithm fail
Code:
#CAS
    nfibo_cas(n):=
    begin
        // /!\ n = N+
        //    version 0.0.3 April 22
        if n≤1 then
            return(n);
            else
            return(nfibo_cas(n-1)+nfibo_cas(n-2));
        end;
    end;
#end

nfibo_cas(28) → 317811
nfibo_cas(30) → BUSY → 832040
nfibo_cas(100) → running non recursive evaluator

What means the above output?

nfibo_cas(100) → ¨ERROR MEMORY¨ (ti68k calcs)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fibonacci sequence by recursive algorithm fail - compsystems - 04-23-2015 02:21 AM



User(s) browsing this thread: 1 Guest(s)