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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9a441a9594e85d08 X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Bignum modular types in Ada95 Date: 1998/01/30 Message-ID: <34D1CC6C.A62922A8@elca-matrix.ch>#1/1 X-Deja-AN: 320547734 Content-Transfer-Encoding: 7bit References: <34CE568C.55D7E23D@cl.cam.ac.uk> <34CF3E78.F816DB5@cl.cam.ac.uk> <34D082F9.ABEC0D3B@elca-matrix.ch> Mime-Version: 1.0 Reply-To: Mats.Weber@elca-matrix.ch Content-Type: text/plain; charset=us-ascii Organization: ELCA Matrix SA Newsgroups: comp.lang.ada Date: 1998-01-30T00:00:00+00:00 List-Id: > True, but the fact remains that I can say "type T is range 1..10**10;" > on some implementations and not others, and that's a portability > problem. The number "10**10" isn't all *that* big -- we're not talking > about 1000 bits, here. OK, but you portably say "type T is range 1 .. 10**9;" and that's good enough for me (to be accurate, it's not formally potable, but it is portable to any reasonable machine with a compiler that follows implementation advice). I think it's a good thing that if you say "type T is range ...", then you will get the machine's built-in arithmetic. > I don't care. I'll be happy with an implementation that works. It > should be efficient for small numbers, and I don't care if it's > inefficient for big numbers, and _really_ inefficient for _really_ big > numbers. Are you talking about supporting type T is range ... for bignums, or a package declaring a private bignum type and its operations ?