Re: Magic number in Boolean



On Fri, 10 Mar 2006 16:51:00 +0100, Hendrik Maryns
<hendrik_maryns@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :

Ok, but then why not 1 and 2, they are also both prime. Of course I see
the use of taking some bigger number, but still the question remains:
why some primes around 1200? Because accidentally the implementor knew
them, then?

Consider what happens when you create a composite hashCode either by
multiplication, addition, xor, shift/or etc .

My guess is those numbers help the boolean effect from getting lost.

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.