E.V.E  0.1-beta

◆ acosd

eve::acosd = {}
inlineconstexpr

Callable object computing acosd.

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

Members Functions

Member Effect
operator() the computation of acosd

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

Parameters

x: floating real value.

Return value

Returns the elementwise value in degrees of the arc cosine of the input in the range \([0 , 180]\).

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/acosd.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::acosd(pf) = " << eve::acosd(pf) << '\n';
float xf = 1.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::acosd(xf) = " << eve::acosd(xf) << '\n';
return 0;
}
constexpr callable_acosd_ acosd
Callable object computing acosd.
Definition: acosd.hpp:70
Wrapper for SIMD registers.
Definition: wide.hpp:65