◆ sind()

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

This function object returns the sine of the angle in degree: \(\sin(\pi x/180)\).

Header <boost/simd/function/sind.hpp>
Note

As most other trigonometric function sind can be called with a second optional parameter which is a tag on speed and accuracy (see cos for further details)

see sincosd, sin, sinpi

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::sind(pf) = " << bs::sind(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::sind(xf) = " << bs::sind(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::sind(pf) = (0.0174524, 0.0348995, -0.0174524, 0.00872654)
---- scalar
<- xf = 2
-> bs::sind(xf) = 0.0348995