E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
modf
auto eve::modf =
functor
<modf_t>
inline
constexpr
Header file
#include <eve/module/core.hpp>
Callable Signatures
namespace
eve
{
// Regular overload
constexpr
auto
modf
(
floating_value
auto
x)
noexcept
;
// 1
// Lanes masking
constexpr
auto
modf
[
conditional_expr
auto
c](
floating_value
auto
x)
noexcept
;
// 2
constexpr
auto
modf
[
logical_value
auto
m](
floating_value
auto
x)
noexcept
;
// 2
// Semantic options
constexpr
auto
modf
[
raw
](
floating_value
auto
x)
noexcept
;
// 3
constexpr
auto
modf
[
pedantic
](
floating_value
auto
x)
noexcept
;
// 3
constexpr
auto
modf
[
almost
](
floating_value
auto
x)
noexcept
;
// 3
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
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::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:134
eve::modf
constexpr auto modf
elementwise_callable object computing the elementwise pair of fractional and integral parts of the va...
Definition
modf.hpp:79
eve::almost
constexpr auto almost
Turns an equality or an ordering into its tolerant form.
Definition
core.hpp:313
eve::raw
constexpr auto raw
Performs the operation minimally, trading accuracy for speed.
Definition
core.hpp:95
eve::pedantic
constexpr auto pedantic
Follows the corner cases of the corresponding standard function.
Definition
core.hpp:91
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
real
argument.
Return value
A
kumi::tuple
of values containing respectively the
frac(x)
and
trunc(x)
,
[The operation is performed conditionally](@ref conditional).
A
kumi::tuple
of values containing respectively the
frac[o](x)
and
trunc
[o](x)
where
o
is the chosen option.
Example
// revision 1
#include <eve/module/core.hpp>
#include <iostream>
int
main()
{
eve::wide
wf0{-0.0f, 1.30f, -1.3f,
eve::inf
(
eve::as<float>
()),
0.0f,
eve::nan
(
eve::as<float>
()), 2.0f,
eve::prev
(2.0f)};
eve::wide
wf1{-0.0f, 1.30f, -1.3f,
eve::valmax
(
eve::as<float>
()),
0.0f,
eve::valmin
(
eve::as<float>
()), 2.0f,
eve::prev
(2.0f)};
std::cout <<
"<- wf0 = "
<< wf0 <<
"\n"
;
std::cout <<
"<- wf1 = "
<< wf1 <<
"\n"
;
std::cout <<
"-> modf(wf0) = "
<<
eve::modf
(wf0) <<
"\n"
;
std::cout <<
"-> modf[raw](wf1) = "
<<
eve::modf
[
eve::raw
](wf1) <<
"\n"
;
std::cout <<
"-> modf[pedantic](wf0) = "
<<
eve::modf
[
eve::pedantic
](wf0) <<
"\n"
;
std::cout <<
"-> modf[almost](wf0) = "
<<
eve::modf
[
eve::almost
](wf0) <<
"\n"
;
}
eve::valmin
constexpr auto valmin
Computes the lowest representable value.
Definition
valmin.hpp:67
eve::nan
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition
nan.hpp:67
eve::valmax
constexpr auto valmax
Computes the greatest representable value.
Definition
valmax.hpp:67
eve::inf
constexpr auto inf
Computes the infinity ieee value.
Definition
inf.hpp:67
eve::prev
constexpr auto prev
Computes the nth previous representable element.
Definition
prev.hpp:102
eve::as
Lightweight type-wrapper.
Definition
as.hpp:29
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve