From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Ada.Numerics.Big_Numbers.Big_Integer has a limit of 300 digits?
Date: Thu, 23 Dec 2021 16:48:17 +0100 [thread overview]
Message-ID: <sq25o3$hg5$1@dont-email.me> (raw)
In-Reply-To: <afc2e263-66d3-4047-aecd-22932484a9a6n@googlegroups.com>
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
next prev parent reply other threads:[~2021-12-23 15:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 5:57 Ada.Numerics.Big_Numbers.Big_Integer has a limit of 300 digits? Michael Ferguson
2021-12-22 8:25 ` Mark Lorenzen
2021-12-22 11:14 ` AdaMagica
2021-12-22 11:32 ` AdaMagica
2021-12-22 16:04 ` AdaMagica
2021-12-22 17:37 ` Niklas Holsti
2021-12-22 20:34 ` Simon Wright
2021-12-22 17:01 ` Luke A. Guest
2021-12-22 17:27 ` Michael Ferguson
2021-12-22 17:43 ` Ben Bacarisse
2021-12-22 17:48 ` Niklas Holsti
2021-12-22 18:02 ` Michael Ferguson
2021-12-22 19:05 ` Niklas Holsti
2021-12-23 8:31 ` Luke A. Guest
2021-12-23 8:54 ` Dmitry A. Kazakov
2021-12-23 11:41 ` AdaMagica
2021-12-23 12:18 ` Niklas Holsti
2021-12-23 14:01 ` Ben Bacarisse
2021-12-22 19:26 ` Mark Lorenzen
2021-12-22 20:43 ` Niklas Holsti
2021-12-22 20:31 ` Paul Rubin
2021-12-22 20:39 ` Paul Rubin
2021-12-23 15:48 ` Jeffrey R.Carter [this message]
2021-12-24 9:09 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox