public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/48760] New: std::complex constructor buggy in the face of NaN's
@ 2011-04-25 11:19 john at johnmaddock dot co.uk
  2011-04-25 12:08 ` [Bug middle-end/48760] [4.6 / 4.7 Regression (?)] " paolo.carlini at oracle dot com
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: john at johnmaddock dot co.uk @ 2011-04-25 11:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48760

           Summary: std::complex constructor buggy in the face of NaN's
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: john@johnmaddock.co.uk


If a std::complex<T> is constructed where one argument is finite and one a NaN
then the result is a complex number with both parts NaN, which is in violation
of 26.4.4 in the C++2011 std.

For example:

std::complex<float> c(0, std::numeric::limits<float>::quiet_NaN());

results in both real and imaginary parts of c being a NaN.

This causes failures in the Boost.Math regression tests, see also section
G.6.1.1 in C99 where such values can have well defined results for complex-trig
operations.


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-11-02  9:44 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-25 11:19 [Bug libstdc++/48760] New: std::complex constructor buggy in the face of NaN's john at johnmaddock dot co.uk
2011-04-25 12:08 ` [Bug middle-end/48760] [4.6 / 4.7 Regression (?)] " paolo.carlini at oracle dot com
2011-04-25 12:42 ` paolo.carlini at oracle dot com
2011-04-25 13:23 ` paolo.carlini at oracle dot com
2011-04-25 16:02 ` joseph at codesourcery dot com
2011-04-25 16:14 ` [Bug libstdc++/48760] " paolo.carlini at oracle dot com
2011-04-25 16:19 ` paolo.carlini at oracle dot com
2011-04-25 16:47 ` paolo.carlini at oracle dot com
2011-04-25 17:22 ` john at johnmaddock dot co.uk
2011-04-25 17:58 ` gdr at gcc dot gnu.org
2011-04-25 18:12 ` paolo.carlini at oracle dot com
2011-04-25 21:41 ` gdr at gcc dot gnu.org
2011-04-25 22:05 ` paolo.carlini at oracle dot com
2011-04-26  8:45 ` rguenth at gcc dot gnu.org
2011-04-26 10:08 ` paolo.carlini at oracle dot com
2011-04-26 14:18 ` gdr at gcc dot gnu.org
2011-04-26 14:32 ` joseph at codesourcery dot com
2011-04-26 14:56 ` paolo.carlini at oracle dot com
2011-04-26 15:07 ` joseph at codesourcery dot com
2011-04-27  0:04 ` jason at gcc dot gnu.org
2011-04-27  1:31 ` paolo.carlini at oracle dot com
2011-04-27  3:59 ` jason at gcc dot gnu.org
2011-04-27  9:16 ` [Bug libstdc++/48760] [4.6 / 4.7 Regression] " paolo.carlini at oracle dot com
2011-04-27 13:14 ` jason at gcc dot gnu.org
2011-04-27 14:06 ` paolo.carlini at oracle dot com
2011-04-27 21:41 ` paolo.carlini at oracle dot com
2011-04-28  1:54 ` jason at gcc dot gnu.org
2011-04-28 10:53 ` paolo at gcc dot gnu.org
2011-04-28 11:02 ` [Bug libstdc++/48760] [4.6 " paolo.carlini at oracle dot com
2011-04-29 23:24 ` paolo.carlini at oracle dot com
2011-04-29 23:25 ` paolo at gcc dot gnu.org
2011-04-29 23:54 ` gdr at gcc dot gnu.org
2011-04-30 18:19 ` paolo.carlini at oracle dot com
2011-05-02  8:59 ` rguenth at gcc dot gnu.org
2011-11-02  9:44 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).