E.V.E
v2023.02.15

◆ acoth

eve::acoth = {}
inlineconstexpr

Callable object computing \(\frac{1}{2}\log((x+1)/(x-1))\).

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T acoth(T x) noexcept; //1
template< eve::floating_value T >
}
constexpr callable_acoth_ acoth
Callable object computing .
Definition: acoth.hpp:70
constexpr callable_acosh_ acosh
Callable object computing .
Definition: acosh.hpp:96
Definition: abi.hpp:18
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:39

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic cotangent of the input. The inverse hyperbolic sine is semantically equivalent to \(\frac{1}{2}\log((x+1)/(x-1))\).

    In particular:

    • If the element is \(\pm1\), \(\pm0\) is returned.
    • If the element is \(\pm\infty\), \(\pm1\) is returned.
    • If the element is less than one or a NaN, NaN is returned.
  2. Returns the complex arc hyperbolic cotangent of z, computed as \(\mathop{\mathrm{atanh}}(1/z)\).

Example

#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {1.0f, 2.0f, eve::inf(eve::as<float>()), eve::nan(eve::as<float>())};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> acoth(pf) = " << eve::acosh(pf) << '\n'
;
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> acosh(xf) = " << eve::acosh(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