◆ asinh()

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

This function object returns the hyperbolic sine argument: \(\log(x+\sqrt{x^2+1})\).

Header <boost/simd/function/asinh.hpp>
See also
log, sqrt, sinh, inc
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::asinh(pf) = " << bs::asinh(pf) << '\n';
float xf = 2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> bs::asinh(xf) = " << bs::asinh(xf) << '\n';
return 0;
}
Possible output:
---- simd
<- pf = (1, 2, -1, 0.5)
-> bs::asinh(pf) = (0.881374, 1.44364, -0.881374, 0.481212)
---- scalar
<- xf = 2
-> bs::asinh(xf) = 1.44364