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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Large Integer Overflow - Causing a Bottleneck - Any solution. Date: Wed, 03 May 2017 17:18:03 +0100 Organization: A noiseless patient Spider Message-ID: References: <45c389ad-5b2c-4f6a-9003-8a64d41d9ddc@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a3f0e2ea0e2edca06ee06d45a71a1165"; logging-data="4390"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fte79tpVVD9dC3YlFp1O1hTfnLfWfCaI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:8RfKppSbx6n9f/M3reI3KawO7Ag= sha1:esrP6tQkjLdgiAkL+27Z3Emmczo= Xref: news.eternal-september.org comp.lang.ada:46665 Date: 2017-05-03T17:18:03+01:00 List-Id: Austin Obyrne writes: > I am using a very old Ada compiler (gnat 311.p) in the Windows_7 > operating system that has 64-bit architecture to write cryptography. > > Everything has gone well thus far but now I find I am being stymied > from expanding my cipher by the upper bound placed by my Ada compiler > on positive integers to 2^31 -1 or 2147483647 for positive integers. > > Is there any solution to this that won't want me to leave the main > program in order to do it. Even where a GNAT is built for a machine with 64-bit addresses, it uses 32-bit integers as you have seen. You could try, near the top of your program (assuming it's just one compilation unit), subtype Integer is Long_Integer;