E.V.E  0.1-beta

◆ erf_inv

eve::erf_inv = {}
inlineconstexpr

Callable object computing the inverse of the \(\mbox{erf}\) function.

Required header: #include <eve/function/erf_inv.hpp>

Members Functions

Member Effect
operator() the erf_inv operation
operator[] Construct a conditional version of current function object

auto operator()( floating_real_value auto x) const noexcept;
Definition: value.hpp:103

Parameters

x: floating real value.

Return value

Returns elementwise y such that erf(y)==x

The result type is of the same type as the parameter. The function returns Nan outside of the interval \([-1,1]\).


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::erf_inv

Parameters

cond : conditional expression

Return value

A Callable object so that the expression erf_inv[cond](x, ...) is equivalent to if_else(cond,erf_inv(x, ...),x)


Supported decorators

  • eve::diff, eve::diff_1st, eve::diff_nth

    Required header: #include <eve/function/diff/erf_inv.hpp>

    The expression diff(erf_inv)(x) computes the derivative of the function at x.

Example

See it live on Compiler Explorer

#include <eve/function/erf_inv.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = { 0.0f, 1.0f, -1.0f, -0.5f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> eve::erf_inv(pf) = " << eve::erf_inv(pf) << '\n';
float xf = 1.0f;
float yf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::erf_inv(xf) = " << eve::erf_inv(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> eve::erf_inv(yf) = " << eve::erf_inv(yf) << '\n';
return 0;
}
constexpr callable_erf_inv_ erf_inv
Callable object computing the inverse of the function.
Definition: erf_inv.hpp:79
Wrapper for SIMD registers.
Definition: wide.hpp:65