This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/28406] What should be value of sqrt(complex<double>(-1.0,-0.0))?
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2006 18:16:05 -0000
- Subject: [Bug libstdc++/28406] What should be value of sqrt(complex<double>(-1.0,-0.0))?
- References: <bug-28406-11211@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pcarlini at suse dot de 2006-08-07 18:16 -------
(In reply to comment #7)
> By the way, as I read the cited LIA-3 draft, it's also consisten with C99. To
> restate my point in a different way, if we believe there is an inconsistency
> between C99 and C++03, then the former can only win about this specific issue
> (and hopefully C++0x also).
But, actually, I don't think there are any inconsistencis here: the C++03
standard has no notion of -0.0 and, I maintain, the return value of sqrt(-1.0,
-0.0) is undefined in C++03. Moreover, the value which we are currently (in GCC
4.x) returning, is consistent with C99 and LIA-3, and that seems a good QoI to
me. Really, after all, I think everything is fine, for now at least (in
principle C++0x may decide to be inconsistent with C99 and LIA-3 ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28406