◆ acosh()

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

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

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