◆ acosd()

IEEEValue boost::simd::acosd ( IEEEValue const &  x)

This function object returns the inverse cosine in degree.

Header <boost/simd/function/acosd.hpp>
Decorators
  • pedantic_ is similar to indeg(pedantic_)(acos(x));
See also
acos, acospi, cosd, indeg
Example:
#include <boost/simd/trigonometric.hpp>
#include <boost/simd/pack.hpp>
#include <iostream>
namespace bs = boost::simd;
using pack_ft = bs::pack <float, 4>;
int main()
{
pack_ft pf = {1.0f, 2.0f, -1.0f, 0.5f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> bs::acosd(pf) = " << bs::acosd(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::acosd(xf) = " << bs::acosd(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::acosd(pf) = (0, -nan, 180, 60)
---- scalar
<- xf = 2
-> bs::acosd(xf) = -nan