E.V.E
v2023.02.15

◆ atand

eve::atand = {}
inlineconstexpr

Callable object computing arc tangent in degrees.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T atand(T x) noexcept;
}
constexpr callable_atand_ atand
Callable object computing arc tangent in degrees.
Definition: atand.hpp:58
Definition: abi.hpp:18

Parameters

x: floating real value.

Return value

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

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.

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'
<< "-> atand(pf) = " << eve::atand(pf) << '\n'
;
float xf = 1.0f;
float yf = -2.0f;
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> atand(xf) = " << eve::atand(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> atand(yf) = " << eve::atand(yf) << '\n';
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65