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

◆ frac

auto eve::frac = functor<frac_t>
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
constexpr auto frac(value auto x) noexcept; // 1
// Lanes masking
constexpr auto frac[conditional_expr auto c](value auto x) noexcept; // 2
constexpr auto frac[logical_value auto m](value auto x) noexcept; // 2
// Semantic options
constexpr auto frac[raw](floating_value auto x) noexcept; // 3
constexpr auto frac[pedantic](floating_value auto x) noexcept // 4
constexpr auto frac[almost = tol](floating_value auto x) noexcept; // 5
constexpr auto frac[almost](floating_value auto x) noexcept; // 6
}
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
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition value.hpp:34
constexpr auto frac
elementwise_callable computing the fractional part of the input.
Definition frac.hpp:83
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. The fractional part of x with the same sign as x: x-trunc(x), but keeping the zero sign.
  2. The operation is performed conditionnaly.
  3. just x-trunc(x).
  4. zeros and not finite values are all handled properly.
  5. almost allows a fuzzy interpretation of frac using internally the almost version of trunc.
  6. with no tolerance value, the call is equivalent to frac[tolerance = 3*eps(as(x))(x)

External references