Callable object computing the arc cosine from input in degree.
Defined in Header
#include <eve/module/math.hpp>
{
template< eve::floating_value T >
}
constexpr callable_acosd_ acosd
Callable object computing the arc cosine from input in degree.
Definition: acosd.hpp:58
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.
#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