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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.ada Subject: Re: Ada.Numerics.Big_Numbers.Big_Integer has a limit of 300 digits? Date: Wed, 22 Dec 2021 17:43:46 +0000 Organization: A noiseless patient Spider Message-ID: <87ee64k019.fsf@bsb.me.uk> References: <304dcae2-8b20-43ff-8769-32fa06d4dc10n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="dbe368994a8faf17919528bde6a3c240"; logging-data="26610"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z86tL3wgdFdm6eJFBPLD7gDPlY1lLIs8=" Cancel-Lock: sha1:ykHHLRwB1AOnjEKAkvrwWbj/H9E= sha1:cG8qNXR/fF/OveCEecR7a822vd4= X-BSB-Auth: 1.24c929c914496fb61263.20211222174346GMT.87ee64k019.fsf@bsb.me.uk Xref: reader02.eternal-september.org comp.lang.ada:63242 List-Id: Michael Ferguson writes: > On Wednesday, December 22, 2021 at 11:02:03 AM UTC-6, Luke A. Guest wrote: >> On 22/12/2021 05:57, Michael Ferguson wrote: >> > I just started using the Big_Integer library that is a part of the 202X version of ADA. >> > >> > It is repeatedly described as an "arbitrary precision library" that has user defined implementation. >> > >> > 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. >> >> What are you doing that requires that number of digits? > > I am working on ProjectEuler.net problem number 48. > > The questions asks you to sum the numbers n^n for (2 <= n <= 1000) and > determine what the last ten digits of this number are. > > Obviously, this is quite a trivial problem when using any arbitrary > precision library. Does Ada's Big_Integer type work with modular ranged types? -- Ben.