This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/77858] std::polar throws an exception if rho is negative


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]