From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Ada.Numerics.Big_Numbers.Big_Integer has a limit of 300 digits? Date: Thu, 23 Dec 2021 16:48:17 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 23 Dec 2021 15:48:19 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="ad5f227152e353b85606b5fc37fa7aa1"; logging-data="17925"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UTDI/145uD+Qeu6hQ85b8zRR1JZOctMs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Cancel-Lock: sha1:0OtysZVkIht55Rr0vvMHdDAKw0A= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63258 List-Id: On 2021-12-22 06:57, Michael Ferguson wrote: > > I was under the impression that this library would be able to infinitely calculate numbers of any length, but there is clearly a default limit of 300 digits. As it appears from the rest of the discussion that there is a limit in the implementation of the pkg, you could try using PragmARC.Unbounded_Numbers.Integers https://github.com/jrcarter/PragmARC/blob/Ada-12/pragmarc-unbounded_numbers-integers.ads where the implementation restricts a number to Integer'Last "digits" or the available heap memory, whichever is less. Note that with recent versions of GNAT for 64-bit processors, the "digits" will be 64 bits. -- Jeff Carter "There's no messiah here. There's a mess all right, but no messiah." Monty Python's Life of Brian 84