vtn: Improve accuracy of acos approximation.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 28 Jan 2016 02:39:48 +0000 (18:39 -0800)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 28 Jan 2016 03:55:21 +0000 (19:55 -0800)
commit4604b2871a165e63be2764c1dc0102998e2c4a93
treead6b590308e21028d673ee73edcdb3621639396b
parent7fb35a82281c2d245c7ae421893ffa287405b975
vtn: Improve accuracy of acos approximation.

The adjusted polynomial coefficients come from the numerical
minimization of the L2 norm of the relative error.  The old
coefficients would give a maximum relative error of about 15000 ULP in
the neighborhood around acos(x) = 0, the new ones give a relative
error bounded by less than 2000 ULP in the same neighborhood.
src/glsl/nir/spirv/vtn_glsl450.c