Files
clang-p2996/libclc/generic/lib/math/exp10.inc
Jan Vesely 79b7566210 math: Use precomputed constant for log2(10.0)
exp10 CTS fails with or without this change

Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318063
2017-11-13 18:28:45 +00:00

11 lines
253 B
C++

_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE exp10(__CLC_GENTYPE val) {
// exp10(x) = exp2(x * log2(10))
#if __CLC_FPSIZE == 32
return exp2(val * M_LOG210_F);
#elif __CLC_FPSIZE == 64
return exp2(val * M_LOG210);
#else
#error unknown _CLC_FPSIZE
#endif
}