|
inlineconstexpr |
Computes the reduced part of the scaled input.
The call is equivalent to a0-roundscale(a0,scale)
Defined in Header
Parameters
x
: realfloating value.scale
: int or std::integral_constant of int type limited to the range [0, 15].Return value
Returns the elementwise reduced part of the scaled input. The number of fraction bits retained is specified by scale. By default the internal rounding after scaling is done to nearest integer.
Masked Call
The call eve::fracscale[mask](x, scale)
provides a masked version of eve::fracscale
which is equivalent to if_else (mask, eve::fracscale(x, scale), x)
.
Example
eve::to_nearest, eve::toward_zero, eve::upward, eve::downward
If d is one of these 4 decorators The call d(eve:fracscale)(x, scale)
, call is equivalent to a0-d(eve::roundscale)(a0, scale)