E.V.E
v2023.02.15
Loading...
Searching...
No Matches
Inverse hyperbolic

Detailed Description

These functions allows performing inverse hyperbolic computations

Variables

constexpr auto eve::acosh = functor<acosh_t>
 elementwise_callable object computing \(\log(x+\sqrt{x^2-1})\).
constexpr auto eve::acoth = functor<acoth_t>
 elementwise_callable object computing the inverse hyperbolic cotangent.
constexpr auto eve::acsch = functor<acsch_t>
 elementwise_callable object computing the inverse hyperbolic cosecant, \(\log(1/x+\sqrt{1/x^2+1})\).
constexpr auto eve::agd = functor<agd_t>
 elementwise_callable object computing the inverse gudermannian, i.e. \(2\tanh(\tan(x/2))\).
constexpr auto eve::asech = functor<asech_t>
 elementwise_callable object computing the inverse hyperbolic secant: \(\log(1/x+\sqrt{1/x^2-1})\).
constexpr auto eve::asinh = functor<asinh_t>
 elementwise_callable object computing the inverse hyperbolic sine : \(\log(x+\sqrt{x^2+1})\).
constexpr auto eve::atanh = functor<atanh_t>
 elementwise_callable object computing the inverse hyperbolic tangent.

Variable Documentation

◆ acosh

auto eve::acosh = functor<acosh_t>
inlineconstexpr

elementwise_callable object computing \(\log(x+\sqrt{x^2-1})\).

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto acosh(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto acosh[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto acosh[logical_value auto m](floating_value auto x) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
constexpr auto acosh
elementwise_callable object computing .
Definition acosh.hpp:84
EVE Main Namespace.
Definition abi.hpp:19

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic cosine of the input. For values in the domain x>1, the inverse hyperbolic cosine is semantically equivalent to \(\log(x+\sqrt{x^2-1})\). In particular:
    • If x is less than \(1\) or Nan, NaN is returned.
    • If x is \(1\), \(+0\) is returned.
    • If x is \(+\infty\), \(+\infty\) is returned.
    • If x is a Nan, NaN is returned.
  2. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> acosh(wf) = " << eve::acosh(wf) << "\n";
std::cout << "-> acosh[ignore_last(2)](wf)= " << eve::acosh[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> acosh[wf != 2.0f](wf) = " << eve::acosh[wf != 2.0f](wf) << "\n";
}
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition nan.hpp:67
constexpr auto inf
Computes the infinity ieee value.
Definition inf.hpp:67
Lightweight type-wrapper.
Definition as.hpp:29
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:361
Wrapper for SIMD registers.
Definition wide.hpp:94

◆ acoth

auto eve::acoth = functor<acoth_t>
inlineconstexpr

elementwise_callable object computing the inverse hyperbolic cotangent.

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto acoth(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto acoth[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto acoth[logical_value auto m](floating_value auto x) noexcept; // 2
}
constexpr auto acoth
elementwise_callable object computing the inverse hyperbolic cotangent.
Definition acoth.hpp:77

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic cotangent of the input in the range \([-\frac\pi2, \frac\pi2]\). 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. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> acoth(wf) = " << eve::acoth(wf) << "\n";
std::cout << "-> acoth[ignore_last(2)](wf)= " << eve::acoth[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> acoth[wf != 2.0f](wf) = " << eve::acoth[wf != 2.0f](wf) << "\n";
}

◆ acsch

auto eve::acsch = functor<acsch_t>
inlineconstexpr

elementwise_callable object computing the inverse hyperbolic cosecant, \(\log(1/x+\sqrt{1/x^2+1})\).

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto acsch(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto acsch[conditional_expr auto c](floating_value auto x) noexcept; // 3
constexpr auto acsch[logical_value auto m](floating_value auto x) noexcept; // 3
}
constexpr auto acsch
elementwise_callable object computing the inverse hyperbolic cosecant, .
Definition acsch.hpp:79

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic cosecant of the input. For values in the domain x>1, the inverse hyperbolic cosecant is semantically equivalent to \(\log(1/x+\sqrt{1/x^2+1})\). In particular:
    • If the element is \(\pm\infty\), \(\pm0\) returned.
    • If the element is \(\pm1\), \(\pm\infty\) is returned.
    • If the element does not belong \(]0,1[\), NaN is returned.
  2. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide wf = {1.0f, 2.0f, eve::inf(eve::as<float>()), 0.5f};
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> acsch(wf) = " << eve::acsch(wf) << "\n";
std::cout << "-> acsch[ignore_last(2)](wf)= " << eve::acsch[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> acsch[wf != 2.0f](wf) = " << eve::acsch[wf != 2.0f](wf) << "\n";
}

◆ agd

auto eve::agd = functor<agd_t>
inlineconstexpr

elementwise_callable object computing the inverse gudermannian, i.e. \(2\tanh(\tan(x/2))\).

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto agd(floating_value auto x) noexcept; // 1
// Semantic option
constexpr auto agd[raw](floating_value auto x) noexcept; // 2
constexpr auto agd[fast] (floating_value auto x) noexcept; // 2
// Lanes masking
constexpr auto agd[conditional_expr auto c](floating_value auto x) noexcept; // 3
constexpr auto agd[logical_value auto m](floating_value auto x) noexcept; // 3
}
constexpr auto raw
Performs the operation minimally, trading accuracy for speed.
Definition core.hpp:95
constexpr auto fast
Performs the operation faster than the regular call while keeping more accuracy than raw.
Definition core.hpp:79
constexpr auto agd
elementwise_callable object computing the inverse gudermannian, i.e. .
Definition agd.hpp:83

Parameters

Return value

  1. Returns the elementwise inverse gudermannian of the input for x angle in the superior half circle. In particular:
    • If the element is \(\pm0\), \(0\) is returned.
    • If the element is \(\pm\pi/2\), \(\infty\) is returned.
    • If the element is not in \([-\pi/2, \pi/2] \), NaN is returned.
  2. The raw and fast options use internally less accuate but faster implementations.
  3. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> agd(wf) = " << eve::agd(wf) << "\n";
std::cout << "-> agd[ignore_last(2)](wf)= " << eve::agd[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> agd[wf != -2.0f](wf) = " << eve::agd[wf != -2.0f](wf) << "\n";
}
constexpr auto pio_4
Callable object computing the constant .
Definition pio_4.hpp:76
constexpr auto pio_2
Callable object computing the constant .
Definition pio_2.hpp:76

◆ asech

auto eve::asech = functor<asech_t>
inlineconstexpr

elementwise_callable object computing the inverse hyperbolic secant: \(\log(1/x+\sqrt{1/x^2-1})\).

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto asech(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto asech[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto asech[logical_value auto m](floating_value auto x) noexcept; // 2
}
constexpr auto asech
elementwise_callable object computing the inverse hyperbolic secant: .
Definition asech.hpp:78

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic secant of the input in the range \([-\frac\pi2, \frac\pi2]\). In particular:
    • If the element is \(\pm0\), \(\pm\infty\) is returned.
    • If the element is \(1\), \(+0\) returned.
    • If the element does not belong to \([0,1]\), NaN is returned.
  2. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide wf = {1.0f, 0.1f, 0.0f, 0.5f};
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> asech(wf) = " << eve::asech(wf) << "\n";
std::cout << "-> asech[ignore_last(2)](wf)= " << eve::asech[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> asech[wf != 0.5f](wf) = " << eve::asech[wf != 0.5f](wf) << "\n";
}

◆ asinh

auto eve::asinh = functor<asinh_t>
inlineconstexpr

elementwise_callable object computing the inverse hyperbolic sine : \(\log(x+\sqrt{x^2+1})\).

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto asinh(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto asinh[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto asinh[logical_value auto m](floating_value auto x) noexcept; // 2
}
constexpr auto asinh
elementwise_callable object computing the inverse hyperbolic sine : .
Definition asinh.hpp:84

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic sine of the input in the range \([-\frac\pi2, \frac\pi2]\). 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.
  2. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide wf = { 0.0f, 0.99f, -1.0f, -0.5f, -4.0f, -6.0f, 1.0f, -2.0f};
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> asinh(wf) = " << eve::asinh(wf) << "\n";
std::cout << "-> asinh[ignore_last(2)](wf)= " << eve::asinh[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> asinh[wf != -2.0f](wf) = " << eve::asinh[wf != -2.0f](wf) << "\n";
}

◆ atanh

auto eve::atanh = functor<atanh_t>
inlineconstexpr

elementwise_callable object computing the inverse hyperbolic tangent.

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto atanh(floating_value auto x) noexcept; // 1
// Lanes masking
constexpr auto atanh[conditional_expr auto c](floating_value auto x) noexcept; // 2
constexpr auto atanh[logical_value auto m](floating_value auto x) noexcept; // 2
}
constexpr auto atanh
elementwise_callable object computing the inverse hyperbolic tangent.
Definition atanh.hpp:79

Parameters

Return value

  1. Returns the elementwise inverse hyperbolic tangent of the input. In particular:
    • If the element is \(\pm1\), \(\pm\infty\) is returned.
    • If the element is \(\pm0\), \(\pm0\) is returned.
    • If the absolute value of the element is greater than one or a NaN, NaN is returned.
  2. The operation is performed conditionally.

External references

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide wf = { 0.0f, 0.99f, -1.0f, -0.5f};
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> atanh(wf) = " << eve::atanh(wf) << "\n";
std::cout << "-> atanh[ignore_last(2)](wf)= " << eve::atanh[eve::ignore_last(2)](wf) << "\n";
std::cout << "-> atanh[wf != -1.0f](wf) = " << eve::atanh[wf != -1.0f](wf) << "\n";
}