comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: a bug in code shown in ada2012 rational or is it me?
Date: Wed, 20 Jun 2012 09:03:27 -0500
Date: 2012-06-20T09:03:27-05:00	[thread overview]
Message-ID: <jrsl7g$33m$1@speranza.aioe.org> (raw)
In-Reply-To: 65e3ef59-b1bd-4e72-8eb2-f0bbabd30cee@googlegroups.com

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




  reply	other threads:[~2012-06-20 14:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 10:09 a bug in code shown in ada2012 rational or is it me? Nasser M. Abbasi
2012-06-20 10:33 ` Egil Høvik
2012-06-20 10:44 ` Egil Høvik
2012-06-20 14:03   ` Nasser M. Abbasi [this message]
2012-06-21 20:10     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox