re PR libstdc++/20352 (FAIL: 26_numerics/complex/pow.cc execution test)

2005-03-15  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/20352
	* include/std/std_complex.h (pow(const complex<_Tp>&,
	const _Tp&)): On non-c99 platforms, don't try to compute
	log of complex zero.

From-SVN: r96538
This commit is contained in:
Paolo Carlini 2005-03-15 23:38:54 +00:00 committed by Paolo Carlini
parent 69f39b11aa
commit b0de85997d
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2005-03-15 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/20352
* include/std/std_complex.h (pow(const complex<_Tp>&,
const _Tp&)): On non-c99 platforms, don't try to compute
log of complex zero.
2005-03-10 Ben Elliston <bje@au.ibm.com>
* testsuite/22_locale/locale/cons/12658_thread-1.cc: Don't XFAIL

View File

@ -944,6 +944,10 @@ namespace std
complex<_Tp>
pow(const complex<_Tp>& __x, const _Tp& __y)
{
#ifndef _GLIBCXX_USE_C99_COMPLEX
if (__x == _Tp())
return _Tp();
#endif
if (__x.imag() == _Tp() && __x.real() > _Tp())
return pow(__x.real(), __y);