This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77858] std::polar throws an exception if rho is negative
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Oct 2016 07:39:50 +0000
- Subject: [Bug c++/77858] std::polar throws an exception if rho is negative
- Auto-submitted: auto-generated
- References: <bug-77858-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77858
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
The standard says
"Requires: rho shall be non-negative and non-NaN. theta shall be finite."
(I wasn't in favor of it, seems gratuitous, but if you want to complain about
the standard, this isn't the right place)
Libstdc++ has
__glibcxx_assert( __rho >= 0 );
Are you running in some kind of debug mode? I would not expect the assertion to
run otherwise. Please, whenever you report a bug, include a complete testcase,
including the command line used to compile it.