diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-04-04 16:08:54 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-04-04 16:08:54 +0000 |
commit | 35508d492146706b200bc9f07f1305bdde38c6f7 (patch) | |
tree | 685d936b8c0f54883274a699048b58d3caa87175 /libcxx/include | |
parent | c64119a9bfdbd12ce06eb61b81eddac2aab5d9c4 (diff) | |
download | bcm5719-llvm-35508d492146706b200bc9f07f1305bdde38c6f7.tar.gz bcm5719-llvm-35508d492146706b200bc9f07f1305bdde38c6f7.zip |
Fix for Bug #27193; 'std::acos on complex does not agree with C'. Tests need work; so the bug will stay open.
llvm-svn: 265306
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/complex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/complex b/libcxx/include/complex index 2943da1d775..565e1114a06 100644 --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -1399,7 +1399,7 @@ acos(const complex<_Tp>& __x) } if (isinf(__x.imag())) return complex<_Tp>(__pi/_Tp(2), -__x.imag()); - if (__x.real() == 0) + if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag()))) return complex<_Tp>(__pi/_Tp(2), -__x.imag()); complex<_Tp> __z = log(__x + sqrt(pow(__x, _Tp(2)) - _Tp(1))); if (signbit(__x.imag())) |