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

◆ ifrexp

auto eve::ifrexp = functor<ifrexp_t>
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto ifrexp(floating_value auto x) noexcept; // 1
// Semantic options
constexpr auto ifrexp[pedantic](floating_value x) noexcept; // 2
}
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 ifrexp
Computes the elementwise ieee pair of mantissa and exponent of the floating value,...
Definition ifrexp.hpp:70
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. Computes the elementwise ieee ifrexp of the floating value, returning a pair {m,e} of values m being of the same type as x and e of the associated integral type, which are related by \(x = m\times 2^e\), with \(|m| \in [0.5, 1.5[\). However, the cases \(x = \pm\infty\) or is a Nan or a denormal are undefined.
  2. This call takes also properly care of the cases where \(x = \pm0, \pm\infty\) or is a Nan, where \(m=x\) and \(e=0\) and of the denormal cases.

Example

// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wf0{0.0, 1.0, 2.0, 3.0, -1.0, -2.0, -3.0, -4.0};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> ifrexp(wf0) = " << eve::ifrexp(wf0) << "\n";
std::cout << "-> ifrexp[pedantic](wf0) = " << eve::ifrexp[eve::pedantic](wf0) << "\n";
}
Wrapper for SIMD registers.
Definition wide.hpp:86