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=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,23889412ffb2ab1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,CP1252 Received: by 10.68.220.230 with SMTP id pz6mr22736650pbc.3.1340201012439; Wed, 20 Jun 2012 07:03:32 -0700 (PDT) Path: l9ni72565pbj.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: a bug in code shown in ada2012 rational or is it me? Date: Wed, 20 Jun 2012 09:03:27 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <65e3ef59-b1bd-4e72-8eb2-f0bbabd30cee@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: KdJUrTuvv3Zv/s8pPxNluw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-06-20T09:03:27-05:00 List-Id: On 6/20/2012 5:44 AM, Egil H�vik wrote: > On Wednesday, June 20, 2012 12:09:00 PM UTC+2, Nasser M. Abbasi wrote: >> function T(N: Natural) return Long_Long_Float is >> (if N = 0 then 0.25 else >> (T(N�1)�2.0**(N�1)*A(N�1)�A(N))**2); > > Should be: > > function T(N: Natural) return Long_Long_Float is > (if N = 0 then 0.25 else > T(N�1)�2.0**(N�1)*(A(N�1)�A(N))**2); > thank you. I verified that I get Pi now with the above change. May be someone at Adacore can update the pdf file on that web site, as it is not good to have this typo in the code given it is an Ada 2012 document. --Nasser