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

◆ modf

auto eve::modf = functor<modf_t>
inlineconstexpr

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
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept floating_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:116
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:132
constexpr auto modf
elementwise_callable object computing the elementwise pair of fractional and integral parts of the va...
Definition modf.hpp:79
EVE Main Namespace.
Definition abi.hpp:18

Parameters

  • x : real argument.

Return value

  1. A kumi::tuple of values containing respectively the frac(x) and trunc(x), ! 2. [The operation is performed conditionnaly](@ref conditional). ! 3. Akumi::tupleof values containing respectively thefrac[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)};
std::cout << "<- wf0 = " << wf0 << "\n";
std::cout << "-> modf(wf0) = " << eve::modf(wf0) << "\n";
std::cout << "-> modf[raw](wf0) = " << eve::modf[eve::raw](wf0) << "\n";
std::cout << "-> modf[pedantic](wf0) = " << eve::modf[eve::pedantic](wf0) << "\n";
std::cout << "-> modf[almost](wf0) = " << eve::modf[eve::almost](wf0) << "\n";
}
constexpr auto nan
Computes the IEEE quiet NaN constant.
Definition nan.hpp:67
constexpr auto inf
Computes the infinity ieee value.
Definition inf.hpp:66
constexpr auto prev
Computes the nth previous representable element.
Definition prev.hpp:100
Lightweight type-wrapper.
Definition as.hpp:29
Wrapper for SIMD registers.
Definition wide.hpp:70