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.
.



Relevant Pages

  • Re: AMDs 3DNow! imprecise
    ... and I succeeded when using only the regular instructions, ... primes than sieve of Eratosthenes is the standard method (much faster ... sure that approximate result is _always_ bigger than true result. ... Simple way to to multiply approximate a/b by a number slightly ...
    (comp.lang.asm.x86)
  • Re: Bad Guy/Trader thabigwolf (John)
    ... been the bigger man and just not said anything. ...  But I lost my cool with all ... the bullshit. ... Actually there is one more funny story. ...
    (rec.games.pinball)
  • Re: Tier System - for analysts
    ... " That girly man you are describing have won 7 grand slams and lost far ... less matches than that bigger and faster fellow, ... That winner of 7 Gand Slams has lost 4 times in a row to the bigger, ...
    (rec.sport.tennis)
  • Linux 2.6.23-rc4
    ... Ok, I lost it, and let two weeks pass between -rc releases. ... As a result, -rc4 is a bit bigger than it would/should have been, but ... it's not a huge loss. ... git shortlog v2.6.23-rc3..v2.6.23-rc4 ...
    (Linux-Kernel)
  • Re: Is this antenna article serious?
    ... >> For a really great story concerning a Bussard engine, ... > I lost my copy of it maybe 30 years ago but somewhat annoyingly I've been ... then send back the product of the primes. ... factor the received data to recover the primes used. ...
    (sci.electronics.design)