E.V.E
v2022.03.00

◆ acosd

eve::acosd = {}
inlineconstexpr

Callable object computing the arc cosine from input in degree.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T acosd(T x) noexcept;
}
constexpr callable_acosd_ acosd
Callable object computing the arc cosine from input in degree.
Definition: acosd.hpp:58
Definition: all_of.hpp:22

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.

Example

#include <eve/module/math.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;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65