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

◆ rempio2

auto eve::rempio2 = functor<rempio2_t>
inlineconstexpr

Header file

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
{
// Regular overload
constexpr auto rempio2(floating_value auto x) noexcept; // 1
// Semantic options
constexpr auto rempio2[quarter_circle](floating_value auto x) noexcept; // 2.a
constexpr auto rempio2[half_circle](floating_value auto x) noexcept; // 2.b
constexpr auto rempio2[full_circle](floating_value auto x) noexcept; // 2.c
constexpr auto rempio2[medium](floating_value auto x) noexcept; // 2.d
constexpr auto rempio2[big](floating_value auto x) noexcept; // 2.e
}
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
constexpr auto rempio2
elementwise_callable object computing the remainder of the division by .
Definition rempio2.hpp:86
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. A tuple-like consisting of an flint value designing the quadrant and two floating values of type T giving the remainder of x modulo \(\pi/2\) and a corrective to the rounding error on the first result.
  2. These options enable faster computations by assuming that the input satisfies the following respective condition:

    1. \(|x| \le \pi/4\)
    2. \(|x| \le \pi/2\)
    3. \(|x| \le \pi\)
    4. \(|x| \le 10^4\)
    5. no conditions, will directly use the most expansive reduction algorithm

    For each option, if the respective above conditon is not met the result is undefined.

Example

// revision 1
#include <eve/module/math.hpp>
#include <iostream>
int main()
{
eve::wide<float> wf([](auto i, auto c)->float{ return eve::pi(eve::as < float>())*2*(i-c/2);});
std::cout << "<- wf = " << wf << "\n";
std::cout << "-> rempio2(wf) = " << eve::rempio2(wf) << "\n";
std::cout << "-> rempio2[quarter_circle](wf)= " << eve::rempio2[eve::quarter_circle](wf) << "\n";
std::cout << "-> rempio2[half_circle](wf) = " << eve::rempio2[eve::half_circle](wf) << "\n";
std::cout << "-> rempio2[full_circle](wf) = " << eve::rempio2[eve::full_circle](wf) << "\n";
}
constexpr auto pi
Callable object computing the constant .
Definition pi.hpp:77
Wrapper for SIMD registers.
Definition wide.hpp:86