jzakiya / mail.com wrote:
> Nikolai Weibull wrote:
> 
>>* jzakiya / mail.com (Mar 16, 2005 14:40):
>>
>>>The Great Computer Language Shootout Benchmarks
>>>http://shootout.alioth.debian.org/
>>>is using an incorrect fibonacci algorithm benchmark.
>>
>>I really don't see where you're going with this.  The sequence is
> 
> either
> 
>>	0 1 1 2 3 5 8 13 ...
>>
>>or
>>
>>	1 1 2 3 5 8 13 ...
>>
>>Of course, the first makes more sense, but both are almost equally
>>quoted as the Fibonacci sequence.   The first is, as I said, more
> 
> right,
> 
>>as you also point out, but it doesn't really matter as far as the
>>benchmark goes.  If everyone implements the algorithm that the
> 
> benchmark
> 
>>states, then it really won't matter where the sequence begins,
>>	nikolai
>>
>>--
>>::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
>>::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
>>::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
>>main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
> 
> 
> 
> The point is the stated code for every fibonacci benchmark algorithm
> DOES NOT PRODUCE THE CORRECT SERIES!!
> 
> Even if you want to start the series using N=1 as the first index
> value, the coded algorithms produce the following results:
> 
> index N:    benchmark F(N)       Correct F(N)
>     1           1                    1
>     2           2                    1
>     3           3                    2
>     4           5                    3
>     5           8                    5
>     6          13                    8
>     7          21                   13
> etc
> 
> Again, THE BENCHMARK CODE PRODUCES INCORRECT RESULTS!
> It doesn't even produce the sequence it says it should!
> 
> So while the coded algorithm does consistently produce the same
> answers, DON'T CALL IT THE FIBONACCI SERIES ALGORITHM!!
> 
> Would an algorithm that produces the factorial 0!=0 (and not 0!=1)
> be considered to be a correct factorial algorithm? I don't think so.
> 
> What is really dangerous is someone using the coded algorithms thinking
> that for a given index N the computed fibonacci F(N) value is correct.
> 
> This is not about the given code being a valid representation for some
> arbitrary benchmark, but about the misrepresentation of that code as
> producing the correct results for the fibonacce series, a fundamental
> mathematical algorithm that is used in many fields of math and science.

OK, OK, the world will come to an end. It'll be fixed, I'm sure.
Geez.

> Jabari Zakiya

E