Expand description

Implementations of traits for finding the remainder of a number divided by $2^k$, subject to various rounding rules.

These are the traits:

roundingby value or referenceby mutable reference (assignment)
towards $-\infty$ModPowerOf2ModPowerOf2Assign
towards 0RemPowerOf2RemPowerOf2Assign
towards $\infty$NegModPowerOf2NegModPowerOf2Assign

NegModPowerOf2 returns a remainder greater than or equal to zero. This allows the remainder to have an unsigned type, but modifies the usual relation $x = q2^k + r$ to $x = q2^k - r$.