------- Additional Comments From gdr at integrable-solutions dot net 2005-04-08 14:15 ------- Subject: Re: operator-(const T&, const complex<T>&) vs operator-(const complex<T>&, const complex<T>&)
"kreckel at ginac dot de" <[EMAIL PROTECTED]> writes: | (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. Thatis the mathematical question/answer. The real issue is this: * in operator-(const T&, const complex<T>&), should the imaginary part eve be touched? there are vairous ansewrs. And, yes we've been using our brains. | | 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. If you ask me, any system with signed zeros is broken, to start with. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20758