Use a more accurate implementation for exp
authorTom Stellard <thomas.stellard@amd.com>
Wed, 13 May 2015 03:55:09 +0000 (03:55 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 13 May 2015 03:55:09 +0000 (03:55 +0000)
commita64bad83383c1502f193d0917431041fb28b1dff
treed7df52153cdc6626305edab56e401a10876085ff
parentd538fdc217fd575790670953c9e0247125bf6740
Use a more accurate implementation for exp

Using exp2(x * M_LOG2E_F) does not give us accurate enough results for
OpenCL.  If you look at the new exp implementation you'll see that
it does multiply the input by M_LOG2E_F, but it still uses the original
input in part of the calculation.

This exp implementation was ported from the AMD builtin library
and has been tested with piglit, OpenCV, and the ocl conformance tests.

llvm-svn: 237229
libclc/generic/lib/math/exp.cl
libclc/generic/lib/math/exp.inc [deleted file]