On Sun, 2007-06-05 at 21:30 -0400, Tom Lane wrote:
> You can do it always if you simply decrement the weight for each leading
> zero removed.
On reflection, the patch as given was wrong anyway: if two Numerics are
identical except for the presence of leading zeroes, we can't consider
the weight when hashing one of them but not the other.
> The patch as given is wrong since it makes the test for no-digits
> before instead of after removing zeroes.)
Okay, how about the attached revision?
> It'd be a good idea if you repeat the previous number-of-collisions
> experiment on this code.
I'll do this shortly.
-Neil