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

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Fri Apr 8 09:55:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list