◆ acoth()

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

This function object returns the hyperbolic cotangent argument \(\frac12\log\frac{x+1}{x-1}\).

See also
cosh, sinh, acosh, asinh, atanh, asech, acosh, acsch
Header <boost/simd/function/acoth.hpp>
Example:
#include <boost/simd/hyperbolic.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::acoth(pf) = " << bs::acoth(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::acoth(xf) = " << bs::acoth(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::acoth(pf) = (inf, 0.549306, -inf, -nan)
---- scalar
<- xf = 2
-> bs::acoth(xf) = 0.549306