comp.lang.ada
 help / color / mirror / Atom feed
From: austin.obyrne769@btinternet.com
Subject: Re: Integer Overflow Question.
Date: Mon, 25 Aug 2014 05:58:43 -0700 (PDT)
Date: 2014-08-25T05:58:43-07:00	[thread overview]
Message-ID: <440bf1f1-3e98-47ac-b0c0-f73f170a3603@googlegroups.com> (raw)
In-Reply-To: <ltf7lp$844$1@dont-email.me>

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


  reply	other threads:[~2014-08-25 12:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 11:21 Integer Overflow Question austin.obyrne769
2014-08-25 11:46 ` G.B.
2014-08-25 12:58   ` austin.obyrne769 [this message]
2014-08-25 13:09     ` Simon Clubley
2014-08-25 13:29       ` austin.obyrne769
2014-08-25 13:44         ` Simon Clubley
2014-08-25 13:34     ` Aay Jay Chan
2014-08-25 15:09       ` austin.obyrne769
2014-08-25 17:02       ` austin.obyrne769
2014-08-25 17:21         ` Simon Wright
2014-08-25 17:56           ` austin.obyrne769
2014-08-25 19:38           ` austin.obyrne769
2014-08-25 17:40         ` Simon Clubley
2014-08-25 18:09           ` austin.obyrne769
2014-08-25 12:20 ` gautier_niouzes
2014-08-25 12:54   ` austin.obyrne769
replies disabled

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