[Bug c++/77858] std::polar throws an exception if rho is negative
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 5 07:40:00 GMT 2016
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.
More information about the Gcc-bugs
mailing list