E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
frac
auto eve::frac =
functor
<frac_t>
inline
constexpr
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
}
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::value
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition
value.hpp:34
eve::frac
constexpr auto frac
elementwise_callable computing the fractional part of the input.
Definition
frac.hpp:83
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
value
argument.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
tol
scalar_value
tolerance.
Return value
The fractional part of
x
with the same sign as
x
:
x-trunc(x)
, but keeping the zero sign.
The operation is performed conditionnaly
.
just
x-trunc(x)
.
zeros and not finite values are all handled properly.
almost
allows a fuzzy interpretation of
frac
using internally the
almost
version of
trunc
.
with no tolerance value, the call is equivalent to
frac
[tolerance = 3*eps(as(x))(x)
External references
C++ standard reference
Wikipedia
eve