Closed walbourn closed 4 years ago
Note that Intel's SVML has a _mm_exp10_ps
and a _mm_log10_ps
The basic implementation is very simple. Just like XMVectorExpE
and XMVectorLogE
, we compute the base 2 from the minimax constants, then convert using:
log(x) = log2(x) / log2(10)
exp(x) = exp2(x) / exp2(10) = exp2(x) * log2(10)
For base e it was:
g_XMLgE = { { { +1.442695f, +1.442695f, +1.442695f, +1.442695f } } };
g_XMInvLgE = { { { +6.93147182e-1f, +6.93147182e-1f, +6.93147182e-1f, +6.93147182e-1f } } };
For base 10 it should be:
g_XMLg10 = { { { +3.321928f, +3.321928f, +3.321928f, +3.321928f } } };
g_XMInvLg10 = { { { +3.010299956e-1f, +3.010299956e-1f, +3.010299956e-1f, +3.010299956e-1f } } };
DirectXMath has
XMVectorExp2
,XMVectorExpE
,XMVectorLog2
, andXMVectorLogE
.This covers exp/log base 2, exp/log base e.
There is not an implementation of
XMVectorExp10
orXMVectorLog10