From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada.Numerics.Big_Numbers.Big_Integer has a limit of 300 digits?
Date: Thu, 23 Dec 2021 14:18:34 +0200 [thread overview]
Message-ID: <j2j7osFnt0vU1@mid.individual.net> (raw)
In-Reply-To: <1880ebf1-a27a-4ae1-958b-cfb1e1fe50f2n@googlegroups.com>
On 2021-12-23 13:41, AdaMagica wrote:
> Niklas Holsti schrieb am Mittwoch, 22. Dezember 2021 um 20:05:21 UTC+1:
>> However, the
>> Big_Integers package does not directly support computations "mod"
>
> It does A.5.6(18/5).
Yes, there is a "mod" operator for Big_Integer. My point was that there
are no Big_Integer operations, such as multiplication, that are
intrinsically modular in the same way as the operations for modular
types are. So the only way to perform a modular multiplication of
Big_Integers is to first multiply the numbers in the usual way,
producing a possibly very large product, and then apply "mod" to reduce
that product.
In my imperfect understanding, intrinsically modular big-number
computations can be much more efficient than such post-computation
applications of "mod", at least if the modulus is not itself a big number.
next prev parent reply other threads:[~2021-12-23 12:18 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 [this message]
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
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