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,68e7d264bfe3bcbf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-23 09:41:53 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!cs.utexas.edu!convex!news.duke.edu!MathWorks.Com!news.kei.com!world!blanket.mitre.org!linus.mitre.org!linus!mbunix!eachus From: eachus@spectre.mitre.org (Robert I. Eachus) Newsgroups: comp.lang.ada Subject: Re: 64 bit integer support as native type Date: 23 Sep 94 11:55:41 Organization: The Mitre Corp., Bedford, MA. Distribution: world Message-ID: References: <35setv$7nq@walters.East.Sun.COM> NNTP-Posting-Host: spectre.mitre.org In-reply-to: brent@paisley.East.Sun.COM's message of 22 Sep 1994 17:29:35 GMT Date: 1994-09-23T11:55:41+00:00 List-Id: In article <35setv$7nq@walters.East.Sun.COM> brent@paisley.East.Sun.COM (Brent Slone) writes: > Does the Ada LRM define a 64 bit integer? Neither the Ada 83 standard or the Ada 9X standard defines the size of Integer, Long_Integer, Short_Integer, etc. However the 9X standard does provide guidance on the size and naming of various integer types, as do the UI's for Ada 83. > If not, what is the most straightforward method for implementing 64 > bit ints? If the compiler supports 64-bit integer types, and several do, try: type Integer_64 is range -2**63..2**63-1; (You might want to read Robert Dewar's recent post on how to reflect the range you actually need, but you told ME you needed 64-bits. ;-) If that doesn't work, and the compiler supports 32-bit integers, there is a package in the new ADAR components which provides 64-bit and 128-bit integer types. This package is intended to be highly portable. Replacing a few low-level operations with machine code, assembler, or calls to some other language can be used to speed things up. However, this package is pretty efficient right now. If you want to act as a beta tester, let me know. If you have a machine with quad-precision floating point or IEEE Extended Precison, the Generic_Decimal package in the current ADAR works fine. However, it provides the equivalent of fixed-point, not integer. (This solution also works if you need, say, 15-digits of precision on IEEE machines without Extended precision.) -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...