This is an archive of the discontinued LLVM Phabricator instance.

[mlir][math] Add math.cbrt polynomial approximation
ClosedPublic

Authored by rsuderman on Feb 28 2023, 4:45 PM.

Details

Summary

Cbrt can be approximated with some relatively simple polynomial
operators. This includes a lit test validating the implementation
and some run tests that validate numerical correct.

Diff Detail

Event Timeline

rsuderman created this revision.Feb 28 2023, 4:45 PM
rsuderman requested review of this revision.Feb 28 2023, 4:45 PM

Is there some paper or tool or approximation method that we could cite here?

rsuderman updated this revision to Diff 501555.Mar 1 2023, 9:51 AM

Added a source and explanation for the cbrt approximation.

rsuderman updated this revision to Diff 501556.Mar 1 2023, 9:57 AM

Removed explanation as it was slightly incorrect.

jpienaar accepted this revision.Mar 1 2023, 4:51 PM

Thanks!

mlir/test/Dialect/Math/polynomial-approximation.mlir
645

Newline ?

This revision is now accepted and ready to land.Mar 1 2023, 4:51 PM