This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Complex division (was Re: c/2995: __complex__ int typecasts maybe broken)


"Joseph S. Myers" <jsm28@cam.ac.uk> writes:

| On Thu, 8 May 2003, Dara Hazeghi wrote:
| 
| >  http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
| >  trail&database=gcc&pr=2995
| >  
| >  Confirmed with mainline 20030507
| 
| We know what the underlying problem is here (thread starting at
| <http://gcc.gnu.org/ml/gcc/2001-11/msg00790.html>) - the question is
| whether we can deprecate complex integers altogether, or just complex
| integer division.

Deprecating "__complex__ integer-type" is an overkill solution to this
kind of problem, IMO.

Like Joe suggested, deprecating only the problematic operations should
be sufficient.  There are uses of "__complex__ integer-type" in Number
Theory (they actually form a ring known as Gaussian ring).  
Given that complex numbers can also advantageously used to implement
points or vectors in the Euclidean plane (one gets inner product and
cross product i.e. determinant for free).  It would serve any useful
purpose to deprecate __complex__ integer-type just because a some
operations are not meaningful.  Rather, use of those operations should
be diagnosed.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]