Hi Alex,

I just noticed that in the docs for the 'recur' function, there's also a 
fibonacci function where "(if (> 2 N)" should be changed into "(if (>= 2 N)". 
And the result of (fibonacci 22) should thus be 17711.

/Jon

On 27. Oct, 2012, at 10:35, Alexander Burger <a...@software-lab.de> wrote:

> Hi Jon,
> 
>>> This is not a new "bug". I'm using "(if (> N 2)" since 30 years for such
>>> simple benchmark purposes, so I didn't care to change. I don't remember
>>> if I made this up by myself, of if I found it somewhere.
>> 
>> I suggest you add a comment in misc/fibo.l that explains this, in case
> 
> You are right. The more I think about it, the more I see that it is
> quite confusing. And, as I wrote in my previous mail, it is against the
> PicoLisp convention of starting indexes with '1'.
> 
> So I now changed "misc/fibo.l" to use ">=" instead of ">". As far as the
> benchmarks are concerned, it doesn't really matter, as they are always
> relative.
> 
> 
>> Then I suggest a few words in the docs that says "only in debug mode".
>> (This may be the case for other functions in the docs also?)
> 
> Good idea, thanks! I'll do that.
> 
> Cheers,
> - Alex


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to