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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: Samuel Mize Subject: Re: Very big Integers Date: 1999/04/23 Message-ID: <7fq44c$16m1@news1.newsguy.com>#1/1 X-Deja-AN: 470026940 References: To: denny@earthling.net, smize Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-04-23T00:00:00+00:00 List-Id: Denny wrote: > I'd like to know, if there is any possibility to use natural numbers > bigger than Integer'LAST, to print them on the screen and to calculate > with them (add, subtract, power, multiplicate)... > > Something like > > subtype Big_Natural is Very_Long_Integer range 0..2**100 (about, the > bigger the better) It's possible, but unlikely, that your compiler supports them. Just make it a new type instead of a subtype, i.e. make the declaration: type Big_Natural is range 0 .. 2**100; and see if it compiles. If not, you'll have to build your own type. There may be some huge-number packages around, check the repositories you can links to via http://www.adahome.com or http://www.acm.org/sigada . If you can't find one, it shouldn't be too hard to build a new type. Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam