E.V.E  0.1-beta

◆ asin

eve::asin = {}
inlineconstexpr

Callable object computing asin.

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

Members Functions

Member Effect
operator() the computation of asin

auto operator()(floating_value auto x) const noexcept;
Definition: value.hpp:83

Parameters

x: floating real value.

Return value

Returns the elementwise arc sine of the input in the range \([-\frac\pi2 , \frac\pi2]\).

In particular:

  • If the element is \(1\), \(+0\) is returned.
  • If the element \(|x| > 1\), NaN is returned.
  • If the element is a Nan, NaN is returned.

Supported decorators

Example

See it live on Compiler Explorer

#include <eve/function/asin.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'
<< "-> asin(pf) = " << eve::asin(pf) << '\n';
float xf = 1.0f;
float yf = eve::nan(eve::as<float>());
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> asin(xf) = " << eve::asin(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> asin(yf) = " << eve::asin(yf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Callable object computing the nan value.
Definition: nan.hpp:52
constexpr callable_asin_ asin
Callable object computing asin.
Definition: asin.hpp:70
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65