E.V.E
v2022.09.01

◆ sinhcosh

eve::sinhcosh = {}
inlineconstexpr

Callable object performing the simultaneous computations of the hyperbolic sine and cosine.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
kumi::tuple<T, T> sinhcosh(T x) noexcept;
}
constexpr callable_sinhcosh_ sinhcosh
Callable object performing the simultaneous computations of the hyperbolic sine and cosine.
Definition: sinhcosh.hpp:52
Definition: all_of.hpp:22

Parameters

x: floating value.

Return value

Returns the elementwise pair of values containing the hyperbolic sine and the hyperbolic cosine of the input.

Example

#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {-1.0f, 0.0f, 367.0f, -1005600.0f, eve::mindenormal(eve::as<double>()),
auto [s, c] = eve::sinhcosh(pf);
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> sinhcosh(pf) = [" << '\n'
<< " " << s << ", \n"
<< " " << c << '\n'
<< " ]\n";
float xf = 2.3;
auto [ss, sc] = eve::sinhcosh(xf);
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> sinhcosh(xf) = [" << ss << ", " << sc << "]\n";
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_mindenormal_ mindenormal
Computes the smallest denormal positive value.
Definition: mindenormal.hpp:59
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65