This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/20758] operator-(const T&, const complex<T>&) vs operator-(const complex<T>&, const complex<T>&)
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2005 09:51:39 -0000
- Subject: [Bug libstdc++/20758] operator-(const T&, const complex<T>&) vs operator-(const complex<T>&, const complex<T>&)
- References: <20050404213802.20758.kreckel@ginac.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pcarlini at suse dot de 2005-04-08 09:51 -------
Yes, I agree that things seem rather crazy, indeed the behavior that you reported
seemed crazy in the first place. I think all of this is a matter of compromises:
when zero is involved the signedness turns out to be very surprising but, in
general, we spare a full subtraction and its risks of cancellations, etc.
Maybe this can explain the behavior mandated by LIA-3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20758