comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Iswara <haujekchifan@gmail.com>
Subject: Re: Constraint error overflow
Date: Tue, 27 Apr 2021 08:32:18 -0700 (PDT)	[thread overview]
Message-ID: <be95bd99-dc1e-44ec-ac26-a2bacc1e8f86n@googlegroups.com> (raw)
In-Reply-To: <s698u1$bbr$1@gioia.aioe.org>

On Tuesday, April 27, 2021 at 10:00:22 PM UTC+7, Dmitry A. Kazakov wrote:
> On 2021-04-27 16:04, Richard Iswara wrote: 
> > Ada beginner here. I was trying to multiply the first 100 integer and GNAT throw me a constraint error, overflow. I check the error was on integer 13. So what did I do wrong here?
> Nothing, it is just so that 
> 
> 14! > 2**31 - 1 
> 
> -- 
> Regards, 
> Dmitry A. Kazakov 
> http://www.dmitry-kazakov.de

So the compiler is restricted to 32 bit integer value. I had hoped for 64 bit to get 18 digits.
Thank you.

  reply	other threads:[~2021-04-27 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 14:04 Constraint error overflow Richard Iswara
2021-04-27 15:00 ` Dmitry A. Kazakov
2021-04-27 15:32   ` Richard Iswara [this message]
2021-04-27 15:38     ` Mark Lorenzen
2021-04-27 15:44     ` Shark8
2021-04-27 15:52     ` Jeffrey R. Carter
2021-04-27 15:59     ` Dmitry A. Kazakov
2021-04-28  7:03       ` Richard Iswara
2021-04-27 16:31     ` Simon Wright
replies disabled

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