[PATCH] D66050: Improve division estimation of floating points.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 02:41:51 PDT 2019


lebedev.ri added a comment.

In D66050#1658902 <https://reviews.llvm.org/D66050#1658902>, @qiucf wrote:

> I updated a test for testing this new way of division estimations. It's posted at https://github.com/ecnelises/fp-division-test/blob/master/algorithm_test.c so people can do test by their own. Here are my accuracy results:
>
> (Here //OLD// means do iteration once and multiply)
>
> - OLD: 79.47% (7600728294/9563620427), NEW: 99.92% (9555976854/9563620427) with enumeration steps 21277, 21961
> - OLD: 79.51% (17982192012/22615809720), NEW: 99.92% (22597759561/22615809720) with enumeration steps 11587, 17053
> - OLD: 79.52% (72788895710/91532258037), NEW: 99.92% (73098710/91532258037) with enumeration steps 6037, 8087
> - OLD: 79.50% (175651525048/220935684644), NEW: 99.92% (220759033938/220935684644), with enumeration steps 5471, 3697
> - OLD: 79.53% (1807487453401/2272767717744), NEW: 99.92% (2270951449072/2272767717744), with enumeration steps 1523, 1291
> - OLD: 79.52% (4700786248799/5911547429304), NEW: 99.92% (5906822137336/5911547429304), with enumeration steps 983, 769
>
>   //Inaccurate// stands for that error is larger than 0.5ulp. Also I have some other sources in that repository which can be used to test division accuracy after `Ofast`. I think they can be good test suite candidate.
>
>   Results here are quite stable to show that the new way has better accuracy.


Thank you for posting these.
I don't know if the step is fine-grained enough, but these numbers look good.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66050/new/

https://reviews.llvm.org/D66050





More information about the llvm-commits mailing list