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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.16.69 with SMTP id o5mr17829932ica.17.1408971524428; Mon, 25 Aug 2014 05:58:44 -0700 (PDT) X-Received: by 10.140.102.104 with SMTP id v95mr42183qge.6.1408971524359; Mon, 25 Aug 2014 05:58:44 -0700 (PDT) Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!r2no6907791igi.0!news-out.google.com!j6ni7969qas.0!nntp.google.com!i13no2741151qae.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 25 Aug 2014 05:58:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=5.81.69.184; posting-account=j15vhwoAAABH_eywb4s2_dWxAM2kkx7W NNTP-Posting-Host: 5.81.69.184 References: <9c5de333-276c-4e3a-be5a-4e5a98cdaa1d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <440bf1f1-3e98-47ac-b0c0-f73f170a3603@googlegroups.com> Subject: Re: Integer Overflow Question. From: austin.obyrne769@btinternet.com Injection-Date: Mon, 25 Aug 2014 12:58:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.dca.giganews.com comp.lang.ada:188649 Date: 2014-08-25T05:58:43-07:00 List-Id: On Monday, August 25, 2014 12:46:01 PM UTC+1, G.B. wrote: > On 25.08.14 13:21, austin.obyrne769@btinternet.com wrote: > > > I have had to put a bound on the maximum integer size output of computations at 2^31 which of course is the maximum positive integer that 32-bit computers can handle. > > > > Would this not be 2^31 - 1? > > > > Also, how does your program respond when translated with -gnato? >Would this not be 2^31 - 1? - NO The max, POS integer is 2^(32-1) I understand the the max NEG integer is -[2^32-1)+1] Thanks for your help - Austin O Byrne