chickadee » srfi-141 » balanced-remainder

balanced-remainder numerator denominatorprocedure

This division operator pair satisfies the property

   -|d/2| <= r < |d/2|

When d is a power of 2, say 2^k for some k, this reduces to

   -2^(k - 1) <= r < 2^(k - 1)

Computer scientists will immediately recognize this as the interval of integers representable in two's-complement with k bits.