◆ acot()

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

This function object returns the inverse cotangent.

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

For every parameter of floating type r = acot(x) returns the arc r in the interval \([0, \pi[\) such that cot(r) == x.

See also
acotd, acotpi, cot
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::acot(pf) = " << bs::acot(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::acot(xf) = " << bs::acot(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::acot(pf) = (0.785398, 0.463648, -0.785398, 1.10715)
---- scalar
<- xf = 2
-> bs::acot(xf) = 0.463648