We compute the reference values using unsigned types exclusively, even when the input type is signed. This fixes one place where an signed type was inadvertently used.