E.V.E  0.1-beta

◆ dawson

eve::dawson = {}
inlineconstexpr

Callable object computing the dawson function. \(\displaystyle D_+(x)=e^{-x^2}\int_0^{x} e^{t^2} \mbox{d}t\).

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

Members Functions

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

template< value T > auto operator()( T x) const noexcept;

Parameters

x: value.

Return value

Returns elementwise the value of the dawson function.

The result type is of the same type as the parameter.


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

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

Parameters

cond : conditional expression

Return value

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


Supported decorators

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

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

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

Example

See it live on Compiler Explorer

#include <eve/function/dawson.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, -0.0f, -1.0f, 1.0f, 2.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> dawson(pf) = " << eve::dawson(pf) << '\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> dawson(xf) = " << eve::dawson(xf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Callable object computing the nan value.
Definition: nan.hpp:52
constexpr callable_minf_ minf
Callable object computing the negative infinity value.
Definition: minf.hpp:55
constexpr callable_inf_ inf
Callable object computing the infinity ieee value.
Definition: inf.hpp:54
constexpr callable_dawson_ dawson
Callable object computing the dawson function. .
Definition: dawson.hpp:78
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65