re PR libstdc++/20352 (FAIL: 26_numerics/complex/pow.cc execution test)
authorPaolo Carlini <pcarlini@suse.de>
Tue, 15 Mar 2005 23:38:54 +0000 (23:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 15 Mar 2005 23:38:54 +0000 (23:38 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/std_complex.h

index bfda25db058af17f0a3b9bf6358399ab9c8efd12..20544556679af0e3cb7f1794fe4754d6fc120862 100644 (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
index 694acdc41c9e6362d8055d82fc51b08d5be9b32e..6c1e003373035504d84eaa2b80ba002b042d8134 100644 (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);