[mlir][math] Improved math.atan approximation
authorRobert Suderman <suderman@google.com>
Fri, 23 Jun 2023 23:54:48 +0000 (16:54 -0700)
committerRob Suderman <suderman@google.com>
Sat, 24 Jun 2023 00:25:34 +0000 (17:25 -0700)
commit0bedb667af1d105a243d5ad08a460f8b218724cb
tree629b0a7864504e5e4e82ab4d6972ea6a7755a2d8
parent929124993a587a0e30690700f1dfd7e125c7d77a
[mlir][math] Improved math.atan approximation

Used the cephes numerical approximation for `math.atan`. This is a
significant accuracy improvement over the previous taylor series
approximation.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D153656
mlir/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
mlir/test/Dialect/Math/polynomial-approximation.mlir
mlir/test/mlir-cpu-runner/math-polynomial-approx.mlir