On 2026-03-07 18:57, Jeffrey Walton wrote:
You may want to put an assert in the rotates to ensure the rotate amount is less than the bit size.
C2y says that these functions don't have that restriction: if the number of bits is N, then rotating by nonnegative R is equivalent to rotating by R % N. So there's no need for an assertion to check that the shift argument is in range.
Unless you're thinking we should have an assert that the computation internally doesn't shift by more than that? If so, I disagree: it's obviously in range and we don't want to be burdened down by the machinery of 'assert'.
