llvm-project/libclc/generic/lib/math
Tom Stellard a64bad8338 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
2015-05-13 03:55:09 +00:00
..
acos.cl math: Add acos implementation 2014-09-10 15:43:29 +00:00
acos.inc Fix compilation warnings without cl_khr_fp64 2015-04-24 19:54:17 +00:00
acosh.cl Implement acosh builtin 2015-04-07 16:20:20 +00:00
acospi.cl Implement acospi builtin 2015-04-02 17:01:52 +00:00
asin.cl math: Add asin implementation 2014-09-10 15:43:32 +00:00
asin.inc Fix compilation warnings without cl_khr_fp64 2015-04-24 19:54:17 +00:00
asinh.cl Implement asinh builtin 2015-04-02 17:01:54 +00:00
asinpi.cl Implement asinpi builtin 2015-04-02 17:01:56 +00:00
atan.cl Implement atan builtin 2014-07-23 15:16:13 +00:00
atan2.cl Implement atan2 for doubles 2015-05-12 13:48:51 +00:00
atan2pi.cl Implement atan2pi builtin 2015-05-12 14:48:26 +00:00
atanh.cl Implement atanh builtin 2015-04-07 16:20:22 +00:00
atanpi.cl Implement atanpi builtin 2015-04-02 17:01:58 +00:00
binary_impl.inc Protect functions taking double by #ifdef cl_khr_fp64 2014-06-23 14:15:39 +00:00
clc_ldexp.cl Move ldexp soft implementation to a separate file 2015-05-06 21:59:29 +00:00
clc_nextafter.cl Move clcmacro.h to avoid cluttering user namespace v2 2014-06-24 09:36:32 +00:00
copysign.cl Fix implementation of copysign 2014-09-03 15:55:38 +00:00
cos.cl Implement cos for double types 2015-05-12 17:18:46 +00:00
cospi.cl libclc/math: Add cospi 2015-02-26 15:42:00 +00:00
ep_log.cl Implement asinh builtin 2015-04-02 17:01:54 +00:00
ep_log.h Implement asinh builtin 2015-04-02 17:01:54 +00:00
erfc.cl math: Implement erfc 2015-03-18 21:52:07 +00:00
exp.cl Use a more accurate implementation for exp 2015-05-13 03:55:09 +00:00
exp2.cl Implement exp2 using OpenCL C rather than using an intrinsic 2015-05-13 03:55:07 +00:00
exp10.cl Add exp10 2014-06-25 10:06:35 +00:00
exp10.inc Add exp10 2014-06-25 10:06:35 +00:00
exp_helper.cl Implement exp2 using OpenCL C rather than using an intrinsic 2015-05-13 03:55:07 +00:00
exp_helper.h Implement exp2 using OpenCL C rather than using an intrinsic 2015-05-13 03:55:07 +00:00
fmax.cl Implement fmax using __builtin_fmax 2015-03-31 16:59:23 +00:00
fmax.inc Implement fmax using __builtin_fmax 2015-03-31 16:59:23 +00:00
fmin.cl Implement fmin using __builtin_fmin 2015-03-31 16:59:21 +00:00
fmin.inc Implement fmin using __builtin_fmin 2015-03-31 16:59:21 +00:00
fmod.cl Implement fmod 2014-10-05 20:24:52 +00:00
fract.cl Implement fract builtin 2015-04-23 18:50:14 +00:00
fract.inc Implement fract builtin 2015-04-23 18:50:14 +00:00
half_rsqrt.cl Implement half_rsqrt builtin v3 2015-05-08 23:28:44 +00:00
half_rsqrt.inc Implement half_rsqrt builtin v3 2015-05-08 23:28:44 +00:00
half_sqrt.cl math: limit half_sqrt to single precision 2015-05-09 22:31:03 +00:00
half_sqrt.inc Implement half_sqrt builtin v2 2015-03-23 17:01:37 +00:00
hypot.cl Add __CLC_ prefix to all macro definitions in headers 2013-07-08 17:27:02 +00:00
hypot.inc Add __CLC_ prefix to all macro definitions in headers 2013-07-08 17:27:02 +00:00
ldexp.cl Fix ldexp fp64 build error 2015-05-09 22:30:59 +00:00
ldexp.inc math: Add ldexp implementation 2015-05-06 20:53:32 +00:00
log1p.cl Implement log1p builtin 2014-10-07 20:22:42 +00:00
log10.cl Implement log10 2015-01-30 18:00:34 +00:00
log10.inc Implement log10 2015-01-30 18:00:34 +00:00
mad.cl Add __CLC_ prefix to all macro definitions in headers 2013-07-08 17:27:02 +00:00
mad.inc Add __CLC_ prefix to all macro definitions in headers 2013-07-08 17:27:02 +00:00
math.h Implement log1p builtin 2014-10-07 20:22:42 +00:00
nextafter.cl Move clcmacro.h to avoid cluttering user namespace v2 2014-06-24 09:36:32 +00:00
pown.cl Move clcmacro.h to avoid cluttering user namespace v2 2014-06-24 09:36:32 +00:00
sin.cl Implement sin for double types 2015-05-12 17:18:47 +00:00
sincos.cl Add sincos 2014-03-21 16:22:01 +00:00
sincos.inc Add sincos 2014-03-21 16:22:01 +00:00
sincosD_piby4.h libclc/math: Add cospi 2015-02-26 15:42:00 +00:00
sincos_helpers.cl Implement cos for double types 2015-05-12 17:18:46 +00:00
sincos_helpers.h Implement cos for double types 2015-05-12 17:18:46 +00:00
sincospiF_piby4.h libclc/math: Add cospi 2015-02-26 15:42:00 +00:00
sinpi.cl Implement sinpi builtin 2015-05-06 21:59:26 +00:00
tables.cl Implement exp2 using OpenCL C rather than using an intrinsic 2015-05-13 03:55:07 +00:00
tables.h Implement exp2 using OpenCL C rather than using an intrinsic 2015-05-13 03:55:07 +00:00
tan.cl math: Add tan implementation 2014-09-10 15:43:35 +00:00
tan.inc Fix compilation warnings without cl_khr_fp64 2015-04-24 19:54:17 +00:00