◆ exp10()

IEEEValue boost::simd::exp10 ( IEEEValue const &  x)

This function object returns the base ten exponential of its argument: \(10^{x}\).

Header <boost/simd/function/exp10.hpp>
Note:

provisions are made for obtaining a flint result from a flint argument.

See also
exp2, exp, pow
Example:
#include <boost/simd/exponential.hpp>
#include <boost/simd/pack.hpp>
#include <iostream>
namespace bs = boost::simd;
using pack_ft = bs::pack<float, 4>;
int main() {
pack_ft pf = {1.0f, 2.0f, -1.0f, 0.5f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> bs::exp10(pf) = " << bs::exp10(pf) << '\n';
float xf = 2.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::exp10(xf) = " << bs::exp10(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::exp10(pf) = (10, 100, 0.1, 3.16228)
---- scalar
<- xf = 2
-> bs::exp10(xf) = 100