E.V.E
v2023.02.15

◆ atanpi

eve::atanpi = {}
inlineconstexpr

Callable object computing arc tangent in \(\pi\) multiples.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T atanpi(T x) noexcept; //1
template< eve::floating_value T >
}
constexpr callable_atanpi_ atanpi
Callable object computing arc tangent in multiples.
Definition: atanpi.hpp:67
constexpr callable_acospi_ acospi
Callable object computing the arc cosine in multiples.
Definition: acospi.hpp:68
Definition: abi.hpp:18
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:39

Parameters

Return value

  1. Returns the elementwise arc cotangent of the input in the range \([-\frac12, \frac12]\).

    In particular:

    • If the element is \(\pm0\), \(\pm0\) is returned.
    • If the element is \(\pm\infty\), \(\pm\frac\pi2\) is returned.
    • If the element is a Nan, NaN is returned.
  2. Returns elementwise the complex principal value of the arc tangent of the input in \(\pi\) multiples.

Example

#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = { 0.0f, 1.0f, -1.0f, -0.5f};
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> atanpi(pf) = " << eve::atanpi(pf) << '\n';
float xf = 1.0f;
float yf = -2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> atanpi(xf) = " << eve::atanpi(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> atanpi(yf) = " << eve::atanpi(yf) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65