gallivm: Improve lp_build_rcp_refine.
authorJose Fonseca <jfonseca@vmware.com>
Fri, 31 May 2019 16:10:40 +0000 (17:10 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Fri, 28 Jun 2019 10:48:12 +0000 (11:48 +0100)
commit35734129819ca7795adb9145123eb4eafea3a562
tree68b4fa3f014edafd6a61d1fa3182ed249bb87abe
parent0ec8a292fb1e3b0e2f1b6c9d2201ac3bfd993295
gallivm: Improve lp_build_rcp_refine.

Use the alternative more accurate expression from
https://en.wikipedia.org/wiki/Division_algorithm#Newton%E2%80%93Raphson_division

v2: Use lp_build_fmuladd as suggested by Roland

Tested by enabling this code path, and running lp_test_arit.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c