This is the mail archive of the 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]

[Bug libstdc++/20758] operator-(const T&, const complex<T>&) vs operator-(const complex<T>&, const complex<T>&)

------- Additional Comments From pcarlini at suse dot de  2005-04-07 21:17 -------
> 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.

Well, Richard, numerical analysis is not a game, is a well defined branch of
applied mathematics, with its theorems and well defined laws: we cannot
reinvent entire parts of it as part of our work. Which here basically is
about implementing standards, to our best, nothing more, nothing less. In
the specific case at issue, Gaby correctly mentions "LIA-3", one of our refs.
I must say, the copy I'm browsing ("Working draft of the First edition,
2002-07-10"), Section 5.2.5, says explicitly that (I'm using here a, more
practical in text mode, simplified, notation):

   x - (z + i * w) -> (x - z) + i * (-w)

We cannot disregard that, I think: before implementing something else we
should at least try to understand why "LIA-3" mandates that.


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