◆ csch()

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

This function object returns the hyperbolic cosecant: \(1/\sinh(1/x)\).

Header <boost/simd/function/csch.hpp>
See also
sinh, tanh, sech, csch, sinhcosh
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::csch(pf) = " << bs::csch(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::csch(xf) = " << bs::csch(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::csch(pf) = (0.850918, 0.275721, -0.850918, 1.91903)
---- scalar
<- xf = 2
-> bs::csch(xf) = 0.275721