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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a0f1b3fbaa361b4 X-Google-Attributes: gid103376,public From: "Vincent P. Amiot" Subject: Re: Very big Integers Date: 1999/05/04 Message-ID: <01be95c1$a27f21a0$3503af88@alesia>#1/1 X-Deja-AN: 473701817 Sender: news@sd.aonix.com (USENET News Admin @flash) X-Nntp-Posting-Host: dhcp-3.53 References: Organization: Aonix Newsgroups: comp.lang.ada Date: 1999-05-04T00:00:00+00:00 List-Id: Some 8 years ago I implemented an embryo of RSA that needed big numbers and a "modular exponentiation" (you have to perform modulus op on the exponentiation as you go to prevent you from having to deal with untractably large numbers). At the time I used limited private taht were bit arrays in little endian configuration, so the INT was actually: type Int is array (0..Size-1) of Boolean; pragma Pack (Int); where Size could be a generic formal parameter or a constant. Besides the 4 basic binary ops (+,-,*,/), the unary ops (+,-), the comparisons, you will need another basic operation: the numeric litteral... It can be elegantly provided as: function "+" (Left: String) return Int; to be used as follows: X : Int := +"12345678901234567890"; (of course raise constraint error if somebody tries to feed in a string that contains non-numerical chars...) Hope this helps Get back to me if you need further help Vincent Amiot Principal Consultant / Aonix Denny wrote in article ..