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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,17e9efb0492e0d7b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-10 11:47:34 PST Path: nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!europa.eng.gtefsd.com!library.ucla.edu!csulb.edu!paris.ics.uci.edu!ucivax!gateway From: kanderso@kleber.ICS.UCI.EDU (Ken Anderson) Subject: Re: Large Integers? Message-ID: <9501101146.aa15982@paris.ics.uci.edu> Newsgroups: comp.lang.ada References: Date: 10 Jan 95 19:47:34 GMT Date: 1995-01-10T19:47:34+00:00 List-Id: In comp.lang.ada you write: >I am writing a network monitor program in Ada. Since, among other >things, it counts the number of bytes flowing through the cable, I'll >sooner or later run into integer overflows (the number might well >exceed 2**31-1, which is the upper limit of Natural). >Thus, I'm looking for a package that implements large positive >integers. Range 0 .. 2**32-1 ("unsigned word") would not be enough, I'd >rather need at least range 0 .. 2**40. An "unsigned double word" >(0 .. 2**64-1) would save me from overflows for a few thousand >years. I believe type Large_Natural is range 0 .. 2**64-1; should do the trick if your compiler is smart enough and your machine can handle it. The syntax might be wrong (I don't have the ALRM handy) but I think that gives you the idea... Ken -- -------------------------------------------------------------------------------- -Ken Anderson Ken_Anderson@acm.org U.C. Irvine- - "A knowledge of C is probably better than nothing." -- J.G.P. Barnes - --------------------------------------------------------------------------------