E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
exponent
eve::exponent = functor<exponent_t>
inline
constexpr
Header file
#include <eve/module/core.hpp>
Callable Signatures
namespace
eve
{
// Regular overload
constexpr
auto
exponent
(
floating_value
auto
x
)
noexcept
;
// 1
// Semantic options
constexpr
auto
exponent
[raw](
floating_value
auto
x
)
noexcept
;
// 2
}
eve::floating_value
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:116
eve::exponent
constexpr auto exponent
elementwise_callable object computing the integral IEEE exponent of the floating value.
Definition
exponent.hpp:84
eve::translate_t
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition
translation.hpp:107
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
argument
.
Return value
The value of the IEEE exponent is returned. In particular:
inf
,
minf
and
nan
return
maxexponent
plus 1
zero returns zero 2 identical except that results for zero, nan and infinite inputs are unspecified
Note
The exponent \(e\) and mantissa \(m\) of a floating point entry \(x\) are related by \(x = m\times 2^e\), with \(|m| \in \{0\} \cup [1, 2[\).
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 <<
"-> exponent(wf0) = "
<<
eve::exponent
(
wf0
) <<
"\n"
;
std::cout <<
"-> exponent[raw](wf0) = "
<<
eve::exponent
[eve::raw](
wf0
) <<
"\n"
;
}
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve