|
inlineconstexpr |
Computes the fractional part of the input.
Defined in Header
Parameters
Return value
Returns a value with the same type as x
containing the elementwise fractional part of x
with the same sign as x
.
In particular:
x
is \(\pm0\), \(\pm0\) is returned.x
is \(\pm\infty\) or Nan
, a Nan
is returned.For complex inputs the frac operation is applied to both real and imaginary parts.
Masked Call
The call eve;frac[mask](x)
provides a masked version of eve::frac
which is equivalent to if_else (mask, frac(x), x)
.
Example