◆ exp_int
Callable object computing the exponential integral \(\displaystyle \mbox{E}_{n}(x)=\int_0^\infty \frac{e^{-xt}}{t^{n}} \mbox{d}t\). Required header: Members Functions
Definition: value.hpp:103 Parameters
Return value Returns elementwise exponential integral The result type is the common compatible type of the two parameters. If the first parameter inot an integral value it must be a flint, otherwise the result is Nan. auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::exp_int Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/exp_int.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
int main()
{
wide_ft pd = {0.5, 1.5, 0.1, 1.0, 19.0, 25.0, 21.5, 10000.0};
wide_ft n = {0, 1, 5, -2, 10, 6000, 0, 1.5};
wide_ft r = eve::exp_int(n, pd);
wide_ft r0 = eve::exp_int(pd);
std::cout << "---- simd" << '\n'
<< "<- pd = " << pd << '\n'
<< "<- n = " << n << '\n'
<< "-> exp_int(n, pd) = " << r << '\n'
<< "-> exp_int(pd) = " << r0 << '\n';
float xd = 0.5f;
std::cout << "---- scalar" << '\n'
<< "<- xd = " << xd << '\n'
return 0;
}
constexpr callable_exp_int_ exp_int Callable object computing the exponential integral . Definition: exp_int.hpp:81 |