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 19:26:04 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 19:26:04 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0205161826.69dcf050@posting.google.com> References: <3CE26A21.3EC6F802@raytheon.com> <5ee5b646.0205160153.75230135@posting.google.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 1021602364 7272 127.0.0.1 (17 May 2002 02:26:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 17 May 2002 02:26:04 GMT Xref: archiver1.google.com comp.lang.ada:24245 Date: 2002-05-17T02:26:04+00:00 List-Id: adam@irvine.com (Adam Beneschan) wrote in message news:... > If the compiler supports 64-bit integers, then change my question so > that I have a number in the range 0..2**64-1 and a number in the range > -2**63 to 2**63-1 and wish to add them. Now my question still stands. > (Unless you want to answer by saying that these days all compilers > should support 128-bit integers.) First, you quoted two complete levels of complete messages, there really is no need to have this much context in a threaded topic, please quote more selectively. Second, why should I get upset about you not being able to do this for the -2**63 case, if you change the 63 to 64, then you would not be expecting to be able to do it. There are lots of marginal cases where you can do something at the hardware level that you can't map easily into a high level language (one of the most obvious ones is (A*B)/C with a double length intermediate value (of commonly used languages, only COBOL can handle this cleanly).