E.V.E  0.1-beta

◆ sinhcosh

eve::sinhcosh = {}
inlineconstexpr

Callable object performing the simultaneous computations of sinh and cosh.

Required header: #include <eve/function/sinhcosh.hpp>

Members Functions

Member Effect
operator() the computation of sinhcosh
operator[] Construct a conditional version of current function object

auto operator()(floating_value auto x) const noexcept;
Definition: value.hpp:83

Parameters

x: floating value.

Return value

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


auto operator[]( conditional_expression auto cond ) const noexcept;

Higher-order function generating a masked version of eve::sinhcosh

Parameters

cond : conditional expression

Return value

A Callable object so that the expression sinhcosh[cond](x, ...) is equivalent to if_else(cond,sinhcosh(x, ...),x)


Supported decorators

no decorators are supported

Example

See it live on Compiler Explorer

#include <eve/function/sinhcosh.hpp>
#include <eve/wide.hpp>
#include <eve/constant/mindenormal.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/nan.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
Callable object computing the nan value.
Definition: nan.hpp:52
constexpr callable_minf_ minf
Callable object computing the negative infinity value.
Definition: minf.hpp:55
constexpr callable_mindenormal_ mindenormal
Callable object computing the least denormal positive value.
Definition: mindenormal.hpp:56
constexpr callable_inf_ inf
Callable object computing the infinity ieee value.
Definition: inf.hpp:54
constexpr callable_sinhcosh_ sinhcosh
Callable object performing the simultaneous computations of sinh and cosh.
Definition: sinhcosh.hpp:73
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65