hanchenye-llvm-project/libcxx/include
Mikhail Maltsev 477b5f688c [libcxx] Improve accuracy of complex asinh and acosh
Summary:
Currently std::asinh and std::acosh use std::pow to compute x^2. This
results in a significant error when computing e.g. asinh(i) or
acosh(-1).

This patch expresses x^2 directly via x.real() and x.imag(), like it
is done in libstdc++/glibc, and adds tests that checks the accuracy.

Reviewers: EricWF, mclow.lists

Reviewed By: mclow.lists

Subscribers: christof, cfe-commits

Differential Revision: https://reviews.llvm.org/D41629

llvm-svn: 325510
2018-02-19 15:41:36 +00:00
..
experimental While implementing P0777 - preventing unnecessary decay, I found some non-public uses of decay that could be replaced by __uncvref. NFC intented 2018-02-12 15:41:25 +00:00
ext
support Stop using __strtonum_fallback on Android. 2018-02-07 21:58:48 +00:00
CMakeLists.txt [libc++] Unbreak Apple buildbots 2017-12-08 21:50:32 +00:00
__bit_reference
__bsd_locale_defaults.h
__bsd_locale_fallbacks.h
__config Fix size and alignment of array<T, 0>. 2018-02-07 23:50:25 +00:00
__config_site.in [cmake] Add a config option LIBCXX_HAS_WIN32_THREAD_API for enforcing win32 threads 2018-01-05 20:48:29 +00:00
__debug
__functional_03
__functional_base Un-inline a few more variables that are exported from the dylib. 2018-01-02 19:01:45 +00:00
__functional_base_03
__hash_table Revert "Make rehash(0) work with ubsan's unsigned-integer-overflow." 2018-01-08 22:57:12 +00:00
__libcpp_version Update version to 7.0.0svn: cmake, include files and docs 2018-01-03 15:40:29 +00:00
__locale Allow to set locale on Windows. 2017-11-23 10:38:18 +00:00
__mutex_base One more (should be) inline variable that is defined in the dylib 2018-01-02 19:23:30 +00:00
__nullptr
__split_buffer
__sso_allocator
__std_stream
__string Fix misleading indentation; replace a couple of NULLs with nullptr. Resolves https://reviews.llvm.org/D42945 ; thanks to Bruce Mitchener for the patch. 2018-02-06 18:58:05 +00:00
__threading_support libcxx: Move Windows threading support into a .cpp file. 2018-01-23 01:59:43 +00:00
__tree
__tuple
__undef_macros
algorithm Fix misleading indentation; replace a couple of NULLs with nullptr. Resolves https://reviews.llvm.org/D42945 ; thanks to Bruce Mitchener for the patch. 2018-02-06 18:58:05 +00:00
any
array Fix size and alignment of array<T, 0>. 2018-02-07 23:50:25 +00:00
atomic
bitset Fix problems with r'890 when building on machines where sizeof(size_t) != sizeof(unsigned long long) and C++03 2017-11-27 22:27:22 +00:00
cassert
ccomplex
cctype
cerrno
cfenv
cfloat
chrono Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later). 2018-01-02 17:17:01 +00:00
cinttypes
ciso646
climits
clocale
cmath
codecvt
complex [libcxx] Improve accuracy of complex asinh and acosh 2018-02-19 15:41:36 +00:00
complex.h
condition_variable
csetjmp
csignal
cstdarg
cstdbool
cstddef Implement LWG2950: std::byte operations are misspecified 2017-11-14 01:14:53 +00:00
cstdint
cstdio
cstdlib
cstring
ctgmath
ctime
ctype.h
cwchar
cwctype
deque First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only 2017-11-15 05:51:26 +00:00
errno.h
exception [libc++] Support Microsoft ABI without vcruntime headers 2017-10-09 19:25:17 +00:00
float.h
forward_list First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only 2017-11-15 05:51:26 +00:00
fstream libcxx: Provide overloads for basic_filebuf::open() et al that take wchar_t* filenames on Windows. 2018-01-23 02:07:27 +00:00
functional Put type attributes after class keyword 2018-02-13 17:40:59 +00:00
future Revert commit removing allocator support from packaged_task. Will investigate further 2017-11-27 20:47:54 +00:00
initializer_list
inttypes.h
iomanip
ios Fix incorrect indentation. 2018-02-14 00:29:38 +00:00
iosfwd
iostream
istream [libcxx] Make std::basic_istream::get 0-terminate input array in case of error. 2018-01-11 23:23:49 +00:00
iterator [libcxx] Define istream_iterator equality comparison operators out-of-line 2017-12-11 13:54:58 +00:00
limits
limits.h
list Fix PR35564 - std::list splice/erase incorrectly throw in debug mode. 2018-01-25 00:02:48 +00:00
locale
locale.h
map Use multi-key tree search for {map, set}::{count, equal_range} 2018-02-10 02:53:47 +00:00
math.h libcxx: Move #include_next <math.h> out of header guard in wrapper header. 2018-01-26 01:19:23 +00:00
memory Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that) 2018-02-12 17:26:40 +00:00
module.modulemap Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html 2018-02-06 23:13:48 +00:00
mutex Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later). 2018-01-02 17:17:01 +00:00
new Fix libcxx MSVC C++17 redefinition of 'align_val_t' 2018-02-11 22:00:19 +00:00
numeric Fix incorrect handling of move-only types in transform_reduce iter iter iter init, and add test. 2018-01-05 01:31:57 +00:00
optional Implement P0777: Treating unnecessay decay 2018-02-06 20:56:55 +00:00
ostream Fix failure on C++03 bots 2017-11-27 16:17:19 +00:00
queue Implement LWG2783: stack::emplace() and queue::emplace() should return decltype(auto) 2018-01-24 22:42:25 +00:00
random Change an internal table of constants for the poisson distribution from 2018-01-16 14:54:36 +00:00
ratio Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later). 2018-01-02 17:17:01 +00:00
regex [libcxx] Correctly handle invalid regex character class names 2018-01-24 12:45:18 +00:00
scoped_allocator More of P0600; marking allocation routines as [[nodiscard]] 2017-11-26 02:55:38 +00:00
set Use multi-key tree search for {map, set}::{count, equal_range} 2018-02-10 02:53:47 +00:00
setjmp.h
shared_mutex
sstream libcxx: Fix for basic_stringbuf::seekoff() after r320604. 2017-12-19 23:33:16 +00:00
stack Implement LWG2783: stack::emplace() and queue::emplace() should return decltype(auto) 2018-01-24 22:42:25 +00:00
stdbool.h
stddef.h
stdexcept
stdint.h
stdio.h libcxx: Rename vasprintf function to __libcpp_vasprintf. 2018-01-23 18:53:33 +00:00
stdlib.h
streambuf Add static_asserts to basic_ios and basic_stream_buf to ensure that that the traits match the character type. This is a requirement on the user - now we get consistent failures at compile time instead of incomprehensible error messages or runtime failures. This is also LWG#2994 - not yet adopted. 2018-02-01 03:55:27 +00:00
string Implement deduction guide for basic_string as described in P0433 2018-02-08 06:34:03 +00:00
string.h
string_view Change a static_assert to check for is_trivial instead of is_pod, as is mandated by P0767. 2018-01-22 00:17:48 +00:00
strstream
system_error Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later). 2018-01-02 17:17:01 +00:00
tgmath.h Implement LWG 2835 - fix <tgmath.h> 2018-02-12 19:13:24 +00:00
thread
tuple Implement P0777: Treating unnecessay decay 2018-02-06 20:56:55 +00:00
type_traits Implement P0777: Treating unnecessay decay 2018-02-06 20:56:55 +00:00
typeindex
typeinfo libcxx: Use vcruntime declarations for typeinfo on Windows. 2018-01-26 01:22:17 +00:00
unordered_map First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only 2017-11-15 05:51:26 +00:00
unordered_set First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only 2017-11-15 05:51:26 +00:00
utility Fix a typo in the synopsis comment. NFC. Thanks to K-ballo for the catch 2018-02-11 21:51:49 +00:00
valarray [libcxx] Avoid spurious construction of valarray elements 2018-02-08 11:33:48 +00:00
variant While implementing P0777 - preventing unnecessary decay, I found some non-public uses of decay that could be replaced by __uncvref. NFC intented 2018-02-12 15:41:25 +00:00
vector First part of P0600 - '[[nodiscard] in the standard library'. Mark the 'empty()' methods of all the containers as nodiscard. If you're calling empty() w/o looking at the result, you probably meanto to call 'clear()'. c++2a only 2017-11-15 05:51:26 +00:00
wchar.h
wctype.h