[libc++] Fix buggy numerics of tanh(complex) at inf
authorXiang Gao <qasdfgtyuiop@gmail.com>
Thu, 28 Oct 2021 20:06:11 +0000 (16:06 -0400)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 28 Oct 2021 20:10:56 +0000 (16:10 -0400)
commitde493a26b9709fde96938c9e34bd817d0e0b1f6a
tree29362abaa51b9dd24e33317fdb24dea573e7df36
parentf21c2473006f1e6f9e3e28ba70f898a0aece8cb4
[libc++] Fix buggy numerics of tanh(complex) at inf

Because:
    lim[x->inf, tanh(x+iy)] = 1
    lim[x->-inf, tanh(x+iy)] = -1

See also https://github.com/NVIDIA/libcudacxx/pull/210

Differential Revision: https://reviews.llvm.org/D112252
libcxx/include/complex
libcxx/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp