E.V.E
v2023.02.15

◆ radinpi

eve::radinpi = {}
inlineconstexpr

Callable object multiplying the input by \(1/\pi\).

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T radinpi(T x) noexcept;
}
constexpr callable_radinpi_ radinpi
Callable object multiplying the input by .
Definition: radinpi.hpp:51
Definition: abi.hpp:18

Parameters

x: floating value.

Return value

Returns the elementwise the radian input converted 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, eve::pio_2(eve::as<float>())
std::cout
<< "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> eve::radinpi(pf) = " << eve::radinpi(pf) << '\n';
float xf = 1.0f;
float yf = eve::pi(eve::as<float>());
std::cout
<< "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> eve::radinpi(xf) = " << eve::radinpi(xf) << '\n'
<< "<- yf = " << yf << '\n'
<< "-> eve::radinpi(yf) = " << eve::radinpi(yf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
constexpr callable_pi_ pi
Callable object computing the constant .
Definition: pi.hpp:49
constexpr callable_pio_2_ pio_2
Callable object computing the constant .
Definition: pio_2.hpp:49
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65