E.V.E
v2023.02.15

◆ erfc_inv

eve::erfc_inv = {}
inlineconstexpr

Computes the complementar error function \( \displaystyle \mbox{erf}(x)=1-\frac{2}{\sqrt\pi}\int_0^{x} e^{-t^2}\mbox{d}t\).

Defined in header

#include <eve/module/special.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_ordered_value T >
T erfc_inv(T x) noexcept;
}
constexpr callable_erfc_inv_ erfc_inv
Computes the complementar error function .
Definition: erfc_inv.hpp:56
Definition: abi.hpp:18

Parameters

Return value

The value of the inverse error function is returned. In particular:

  • If the argument is \(\pm0\), \(1\) is returned.
  • If the argument is \(2\), \(-\infty\) is returned.
  • If the argument is \(0\), \(\infty\) is returned.
  • If the argument is NaN, NaN is returned.

Example

#include <eve/module/special.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = { 0.0f, 1.0f, 1.5f, 1.75f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> eve::erfc_inv(pf) = " << eve::erfc_inv(pf) << '\n'
;
float xf = 1.0f;
float yf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::erfc_inv(xf) = " << eve::erfc_inv(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> eve::erfc_inv(yf) = " << eve::erfc_inv(yf) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65