Callable object computing \(\log(x+\sqrt{x^2+1})\).
Defined in Header
#include <eve/module/math.hpp>
{
template< eve::floating_value T >
template< eve::floating_value T >
}
constexpr callable_asinh_ asinh
Callable object computing .
Definition: asinh.hpp:84
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:39
Parameters
Return value
Returns the elementwise inverse hyperbolic cosine of the input. The inverse hyperbolic sine is semantically equivalent to \(\log(x+\sqrt{x^2+1})\).
In particular:
- If the element is \(\pm0\), \(\pm0\) is returned.
- If the element is \(\pm\infty\), \(\pm\infty\) returned.
- If the element is a
NaN
, NaN
is returned.
- Returns the complex arc hyperbolic sine of z, with branch cuts outside the interval \(i\times[-\pi/2, \pi/2]\) along the imaginary axis.
- for every z: eve::asinh(eve::conj(z)) == eve::conj(std::asinh(z))
- for every z: eve::asinh(-z) == -eve::asinh(z)
- If z is \(+0\), the result is \(+0\)
- If z is \(x+i \infty\) (for any positive finite x), the result is \(+\infty+i \pi/2\)
- If z is \(x,NaN\) (for any finite x), the result is \(NaN+ iNaN\)
- If z is \(+\infty+ iy\) (for any positive finite y), the result is \(+\infty+i 0\)
- If z is \(+\infty+i \infty\), the result is \(+\infty+ i\pi/4\)
- If z is \(+\infty+ iNaN\), the result is \(+\infty+ iNaN\)
- If z is \(NaN+i 0\), the result is \(NaN+i 0\)
- If z is \(NaN+ iy\) (for any finite nonzero y), the result is \(NaN+ iNaN\)
- If z is \(NaN+i \infty\), the result is \(\pm \infty+ iNaN\) (the sign of the real part is unspecified)
- If z is \(NaN+ iNaN\), the result is \(NaN+ iNaN\)
Real version
#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
;
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
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
Complex version
#include <eve/module/complex.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft ref = { 0.0f, 1.0f, -1.0f, 0.5f};
wide_ft imf = { 2.0f , -1.0, -5.0, 0.0};
auto z = eve::as_complex_t<wide_ft>(ref, imf);
std::cout
<< "---- simd" << '\n'
<< "<- z = " << z << '\n'
return 0;
}