#include <clc/math/cos.h>
#include <clc/math/ceil.h>
#include <clc/math/exp.h>
+#include <clc/math/exp10.h>
#include <clc/math/exp2.h>
#include <clc/math/fabs.h>
#include <clc/math/floor.h>
#include <clc/math/native_cos.h>
#include <clc/math/native_divide.h>
#include <clc/math/native_exp.h>
+#include <clc/math/native_exp10.h>
#include <clc/math/native_exp2.h>
#include <clc/math/native_log.h>
#include <clc/math/native_log2.h>
--- /dev/null
+#undef exp10
+
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION exp10
+
+#include <clc/math/gentype.inc>
+
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
--- /dev/null
+#include <clc/clc.h>
+
+#ifdef cl_khr_fp64
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+#endif
+
+#define __CLC_BODY <exp10.inc>
+#include <clc/math/gentype.inc>
--- /dev/null
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE exp10(__CLC_GENTYPE val) {
+ // exp10(x) = exp2(x * log2(10))
+#if __CLC_FPSIZE == 32
+ return exp2(val * log2(10.0f));
+#elif __CLC_FPSIZE == 64
+ return exp2(val * log2(10.0));
+#else
+#error unknown _CLC_FPSIZE
+#endif
+}