Complex division (was Re: c/2995: __complex__ int typecasts maybe broken)
Gabriel Dos Reis
gdr@integrable-solutions.net
Thu May 8 14:26:00 GMT 2003
"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
More information about the Gcc
mailing list