|
inlineconstexpr |
Computes the scaled input rounding.
Defined in Header
Parameters
x
: floating value.scale
: int or std::integral_constant of int type limited to the range [0, 15].Return value
ldexp(round(ldexp(a0,scale),-scale))
Masked Call
The call eve;roundscale[mask](x, scale)
provides a masked version of eve::roundscale
which is equivalent to if_else (mask, roundscale(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(roundscale)(x)
, call is equivalent to eve::ldexp(d(eve::round)(eve::ldexp(a0,scale), -scale))