> sumr computes the same function as
> plan 9's sum -r, which is also the same function as
> seventh edition's sum.  i have always assumed the -r
> stood for "research" as in research unix, although
> the plan 9 manual describes it as "system v's sum -r" and
> other manuals describe it as the "historical bsd algorithm."
> it does seem to have appeared first in v7.

The "-r" option was added to the System V "sum", which
by default actually does a true modulo 2^16 sum of the bytes,
to obtain the Research version.  However, I think the "r"
may have been meant as a mnemonic for "rotating" rather
than "Research"; the "-r" algorithm rotates the accumulator
as the bytes are added to it.

Of course neither of these is as reliable as a polynomial-
based (feedback shift register) checksum for actual
checksumming applications.

Reply via email to