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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f584bf624aabe591 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-16 02:53:15 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Signed integer to modular type conversion Date: 16 May 2002 02:53:15 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0205160153.75230135@posting.google.com> References: <3CE26A21.3EC6F802@raytheon.com> NNTP-Posting-Host: 205.232.38.244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1021542795 13122 127.0.0.1 (16 May 2002 09:53:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 16 May 2002 09:53:15 GMT Xref: archiver1.google.com comp.lang.ada:24166 Date: 2002-05-16T09:53:15+00:00 List-Id: adam@irvine.com (Adam Beneschan) wrote in message news:... > Would you still use something like Z := X + ToModType(Y) [where > ToModType is an instance of Unchecked_Conversion]? No, I would use a 64-bit type to compute. If you have a deficient compiler that does not support 64-bit integers, then you have trouble, but so what? You could have equally asked to deal with numbers in the range 2**44, and then you would have needed a larger type anyway. These days, all compilers should support 64-bit integers.