llvm-project/libcxx/test/std/numerics
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
..
c.math Placate unused variable warnings uncovered by improvements to clang's -Wunused-variable 2017-10-14 15:52:38 +00:00
cfenv/cfenv.syn Move remaining _LIBCPP_VERSION tests into test/libcxx 2016-06-22 02:23:22 +00:00
complex.number [libcxx] Improve accuracy of complex asinh and acosh 2018-02-19 15:41:36 +00:00
numarray [libcxx] Avoid spurious construction of valarray elements 2018-02-08 11:33:48 +00:00
numeric.ops Change add_ten to add_one to avoid triggering ubsan integer overflow. 2018-01-08 19:45:16 +00:00
numeric.requirements
numerics.general
rand Tolerate even more [[nodiscard]] in the STL. Reviewed as https://reviews.llvm.org/D39080 2017-11-15 07:45:07 +00:00
nothing_to_do.pass.cpp