◆ erfcx()

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

This function object computes the underflow-compensating (scaled) complementary error function: \(\displaystyle e^{x^2}\frac{2}{\sqrt\pi}\int_{x}^{\infty} e^{-t^2}\mbox{d}t\).

See also
erfc, erf
Header <boost/simd/function/erfcx.hpp>
Example:
#include <boost/simd/eulerian.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::erfcx(pf) = " << bs::erfcx(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::erfcx(xf) = " << bs::erfcx(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::erfcx(pf) = (0.427584, 0.255396, 5.00898, 0.61569)
---- scalar
<- xf = 2
-> bs::erfcx(xf) = 0.255396