summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-27 11:00:25 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-27 11:00:25 +0000
commitceb6e523bd21ee863539e8f9a315ad68137f5222 (patch)
tree620e30a17939bf79786ab66334d4b0041cd8c78d /libstdc++-v3/include/tr1
parentbf27d02ae36a66ee7243a02d481ef7c82e94d670 (diff)
downloadgcc-ceb6e523bd21ee863539e8f9a315ad68137f5222.tar.gz
2011-10-27 Richard B. Kreckel <kreckel@ginac.de>
Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/50880 * include/std/complex (__complex_acosh): Fix for __z.real() < 0. * include/tr1/complex (__complex_acosh): Likewise. * testsuite/26_numerics/complex/50880.cc: New. * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/tr1')
-rw-r--r--libstdc++-v3/include/tr1/complex2
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/include/tr1/complex b/libstdc++-v3/include/tr1/complex
index fc213b8f1d5..d29b13fe8b8 100644
--- a/libstdc++-v3/include/tr1/complex
+++ b/libstdc++-v3/include/tr1/complex
@@ -189,6 +189,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* (__z.real() + __z.imag()) - _Tp(1.0),
_Tp(2.0) * __z.real() * __z.imag());
__t = std::sqrt(__t);
+ if (__z.real() < _Tp(-0.0))
+ __t = -__t;
return std::log(__t + __z);
}