comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Signed integer to modular type conversion
Date: 16 May 2002 19:26:04 -0700
Date: 2002-05-17T02:26:04+00:00	[thread overview]
Message-ID: <5ee5b646.0205161826.69dcf050@posting.google.com> (raw)
In-Reply-To: b4682ab7.0205160752.3f973bcc@posting.google.com

adam@irvine.com (Adam Beneschan) wrote in message news:<b4682ab7.0205160752.3f973bcc@posting.google.com>...

> 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).



  reply	other threads:[~2002-05-17  2:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15  2:53 Signed integer to modular type conversion Adam Beneschan
2002-05-15  3:34 ` Jim Rogers
2002-05-15 14:01 ` Mark Johnson
2002-05-16  0:02   ` Adam Beneschan
2002-05-16  2:26     ` Steven Deller
2002-05-16  9:53     ` Robert Dewar
2002-05-16 13:46       ` Steve Doiel
2002-05-16 14:00       ` Mark Johnson
2002-05-16 15:52       ` Adam Beneschan
2002-05-17  2:26         ` Robert Dewar [this message]
2002-05-17 16:44           ` Frank J. Lhota
2002-05-16 13:55     ` Mark Johnson
2002-05-15 19:12 ` Robert Dewar
2002-05-15 20:28 ` Adam Beneschan
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15  5:43 Grein, Christoph
2002-05-16  4:39 Grein, Christoph
2002-05-16 14:13 ` Mark Johnson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox