diff options
author | Mikhail Maltsev <mikhail.maltsev@arm.com> | 2018-02-19 15:41:36 +0000 |
---|---|---|
committer | Mikhail Maltsev <mikhail.maltsev@arm.com> | 2018-02-19 15:41:36 +0000 |
commit | 477b5f688c80064753827693c16d49957d3a3a95 (patch) | |
tree | 19c3ec8c8ef9a89cfa83273a5476ee1a3b62c8da /llvm/lib/Object/Object.cpp | |
parent | 9b2aa42f00253d5a5fd8153bfb28481a62beb8d9 (diff) | |
download | llvm-477b5f688c80064753827693c16d49957d3a3a95.zip llvm-477b5f688c80064753827693c16d49957d3a3a95.tar.gz llvm-477b5f688c80064753827693c16d49957d3a3a95.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
0 files changed, 0 insertions, 0 deletions