◆ erfc()

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

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

Header <boost/simd/function/erfc.hpp>
Decorators
  • std_ calls std::erfc

    See also
    erf, erfcx
    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::erfc(pf) = " << bs::erfc(pf) << '\n';
    float xf = 2.0f;
    std::cout
    << "---- scalar" << '\n'
    << "<- xf = " << xf << '\n'
    << "-> bs::erfc(xf) = " << bs::erfc(xf) << '\n';
    return 0;
    }
    Possible output:
    ---- simd
    <- pf = (1, 2, -1, 0.5)
    -> bs::erfc(pf) = (0.157299, 0.00467774, 1.8427, 0.4795)
    ---- scalar
    <- xf = 2
    -> bs::erfc(xf) = 0.00467774