E.V.E
v2022.03.00

◆ 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;
}
constexpr callable_acoth_ acoth
Callable object computing .
Definition: acoth.hpp:57
Definition: all_of.hpp:22

Parameters

x: floating real value.

Return value

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.

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
constexpr callable_acosh_ acosh
Callable object computing .
Definition: acosh.hpp:88
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65