projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c64119a
)
Fix for Bug #27193; 'std::acos on complex does not agree with C'. Tests need work...
author
Marshall Clow
<mclow.lists@gmail.com>
Mon, 4 Apr 2016 16:08:54 +0000
(16:08 +0000)
committer
Marshall Clow
<mclow.lists@gmail.com>
Mon, 4 Apr 2016 16:08:54 +0000
(16:08 +0000)
llvm-svn: 265306
libcxx/include/complex
patch
|
blob
|
history
diff --git
a/libcxx/include/complex
b/libcxx/include/complex
index
2943da1
..
565e111
100644
(file)
--- 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()))