aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
diff options
context:
space:
mode:
authorlntue <35648136+lntue@users.noreply.github.com>2024-07-03 18:05:24 -0400
committerGitHub <noreply@github.com>2024-07-03 18:05:24 -0400
commit7d68d9d2f27535e03934383220282e18edd0c1e8 (patch)
tree7a362f7e21a8a266616da1379b3d6f88faad5ee1 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp
parent5828b04b0373f10fade7eefbeb181dc8ceb98422 (diff)
downloadllvm-7d68d9d2f27535e03934383220282e18edd0c1e8.zip
llvm-7d68d9d2f27535e03934383220282e18edd0c1e8.tar.gz
llvm-7d68d9d2f27535e03934383220282e18edd0c1e8.tar.bz2
[libc][math] Implement correctly rounded double precision tan (#97489)
Using the same range reduction as `sin`, `cos`, and `sincos`: 1) Reducing `x = k*pi/128 + u`, with `|u| <= pi/256`, and `u` is in double-double. 2) Approximate `tan(u)` using degree-9 Taylor polynomial. 3) Compute ``` tan(x) ~ (sin(k*pi/128) + tan(u) * cos(k*pi/128)) / (cos(k*pi/128) - tan(u) * sin(k*pi/128)) ``` using the fast double-double division algorithm in [the CORE-MATH project](https://gitlab.inria.fr/core-math/core-math/-/blob/master/src/binary64/tan/tan.c#L1855). 4) Perform relative-error Ziv's accuracy test 5) If the accuracy tests failed, we redo the computations using 128-bit precision `DyadicFloat`. Fixes https://github.com/llvm/llvm-project/issues/96930
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
0 files changed, 0 insertions, 0 deletions