------- Additional Comments From kreckel at ginac dot de 2005-04-07 20:51 ------- (In reply to comment #11) > I think we need more careful analysis and tracking of both C99, C++ and > LIA-3.
Apart from looking at standards, we could also try to use our brains, right? It must be possible to answer the question whether the current behavior is right or not by analogy with real numbers, ie. simply by looking at the imaginary part alone. On systems without signed zero, there is no problem. On systems with -0.0, the code is trying to compute 0.0 - 0.0. Can that possibly be -0.0? If the answer is _no_, then this is a bug and it ought to be fixed. Period. If the asnwer is _yes_, then, well, then I'm bemazed and confused. BTW: I've always tought that systems that distinguish between 0.0 and -0.0, but not between 0.0 and +0.0 are slightly broken from a mathematical point of view. I would much rather have three zeros: two with signs and one without a sign that would have to be interpreted as having an indeterminate sign (or even complex phase). The "indetermanacy" of the sign could then be reliably propagated to the result in additions, like this: +0.0 + +0.0 == +0.0 +0.0 + 0.0 == 0.0 +0.0 + -0.0 == 0.0 0.0 + 0.0 == 0.0 0.0 + -0.0 == 0.0 -0.0 + -0.0 == -0.0 In such a scheme the sign carries more information than it does on my box which asymetrically cares about a - sign but not about a + sign. Sigh. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20758