diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 23:38:54 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 23:38:54 +0000 |
| commit | 72ecee2737bc91969157d52d0df801c08a5b00da (patch) | |
| tree | e93b190505df4746ab63224f75ba0cdfee540cc6 /libstdc++-v3/include/std/std_complex.h | |
| parent | 29a1d14b1b4097e3ad500d9d52ec2174d7d8f041 (diff) | |
| download | ppe42-gcc-72ecee2737bc91969157d52d0df801c08a5b00da.tar.gz ppe42-gcc-72ecee2737bc91969157d52d0df801c08a5b00da.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96538 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/std_complex.h')
| -rw-r--r-- | libstdc++-v3/include/std/std_complex.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h index 694acdc41c9..6c1e0033730 100644 --- a/libstdc++-v3/include/std/std_complex.h +++ b/libstdc++-v3/include/std/std_complex.h @@ -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); |

