llvm-project/mlir/lib/Dialect/Math/Transforms
Ahmed S. Taei 7e2d672a67 Add polynomial approximation for trigonometric sine and cosine functions
The approximation relays on range reduced version y \in [0, pi/2]. An input x will have
the property that sin(x) = sin(y), -sin(y), cos(y), -cos(y) depends on which quadrable x
is in, where sin(y) and cos(y) are approximated with 5th degree polynomial (of x^2).
As a result a single pattern can be used to compute approximation for both sine and cosine.

Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D104582
2021-06-21 13:00:33 -07:00
..
CMakeLists.txt [mlir] Add polynomial approximation for math::LogOp (using builders API) 2021-02-24 07:50:25 -08:00
ExpandTanh.cpp [PatternRewriter] Rename OwningRewritePatternList -> RewritePatternSet and insert -> add 2021-03-22 16:33:18 -07:00
PolynomialApproximation.cpp Add polynomial approximation for trigonometric sine and cosine functions 2021-06-21 13:00:33 -07:00