From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8de7eedad50552f1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!news-lei1.dfn.de!news.uni-jena.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: Ada bench Date: 20 Mar 2005 10:11:21 GMT Organization: loris.TV Message-ID: References: <87vf7n5njs.fsf@code-hal.de> NNTP-Posting-Host: ppc201.mipool.uni-jena.de X-Trace: fsuj29.rz.uni-jena.de 1111313481 19406 141.35.13.101 (20 Mar 2005 10:11:21 GMT) X-Complaints-To: news@rz.uni-jena.de NNTP-Posting-Date: 20 Mar 2005 10:11:21 GMT User-Agent: slrn/0.9.8.1 (Debian) Xref: g2news1.google.com comp.lang.ada:9628 Date: 2005-03-20T10:11:21+00:00 List-Id: Pascal Obry wrote: > Yes it was a cut&paste problem. There is some other bench that will work > very soon. For example the Fibonacci is fine, only the expected output > is wrong at the moment... Is it necessary to use this recursive fibonacci-code? What about an iterative approach? function it_fibo (wert : in Positive) return Positive is n1 : Positive := 1; n2 : Positive := 1; result : Positive; begin if (wert < 3) then return 1; else for I in 1 .. wert - 2 loop result := n1 + n2; n1 := n2; n2 := result; end loop; return result; end if; end it_fibo; -- mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver Treffen sich zwei Hellseher: "Dir gehts gut und wie gehts mir?"