E.V.E
v2023.02.15

◆ asecpi

eve::asecpi = {}
inlineconstexpr

Callable object computing the arc secant in \(\pi\) multiples.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T asecpi(T x) noexcept;
template< eve::floating_value T >
}
constexpr callable_asecpi_ asecpi
Callable object computing the arc secant in multiples.
Definition: asecpi.hpp:68
Definition: abi.hpp:18
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:39

Parameters

Return value

  1. Returns the elementwise arc secant of the input in \(\pi\) multiples in the range \([0, 1]\).

    In particular:

    • If the element is \(1\), \(+0\) is returned.
    • If the element is \(0\), \(1\) is returned.
    • If the element \(|x| < 1\), NaN is returned.
    • If the element is a Nan, NaN is returned.
  2. Returns elementwise the complex value in \(\pi\) multiples of the arc secant of the input.

Example

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