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 02:53:15 -0700
Date: 2002-05-16T09:53:15+00:00	[thread overview]
Message-ID: <5ee5b646.0205160153.75230135@posting.google.com> (raw)
In-Reply-To: b4682ab7.0205151602.3c564c9e@posting.google.com

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


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



  parent reply	other threads:[~2002-05-16  9:53 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 [this message]
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
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