llvm-project/libcxx/test/std/numerics/complex.number
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
..
ccmplx Placate unused variable warnings uncovered by improvements to clang's -Wunused-variable 2017-10-14 15:52:38 +00:00
cmplx.over [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 7/7. 2016-12-08 21:38:57 +00:00
complex
complex.literals Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers 2017-04-19 00:23:45 +00:00
complex.member.ops Remove trailing whitespace in test suite. Approved by Marshall Clow. 2016-06-01 21:35:39 +00:00
complex.members Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers 2017-04-19 00:23:45 +00:00
complex.ops Add markup for libc++ dylib availability 2017-05-04 17:08:54 +00:00
complex.special Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers 2017-04-19 00:23:45 +00:00
complex.synopsis
complex.transcendentals [libcxx] Improve accuracy of complex asinh and acosh 2018-02-19 15:41:36 +00:00
complex.value.ops Implement LWG2870: Default value of parameter theta of polar should be dependent 2018-01-31 21:42:39 +00:00
cases.h Rename some test data (and make it const) to rid us of some shadowing warnings in the test suite. No functional change. Thanks to STL@microsoft for the report and patch. 2016-06-06 18:24:08 +00:00
layout.pass.cpp