Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: What's the best hashing function? Date: Thu, 17 Sep 2015 08:53:21 -0700 Organization: None to speak of Lines: 15 Message-ID: References: <0cb8f2b6-59fd-4efa-b29c-7f3a3ffe7fdd@googlegroups.com> <3b4ccbaa-f055-41c1-837c-0a2fcf8ebcb3@googlegroups.com> <24708a81-3370-45bb-b7d7-5fd0a595cb1e@googlegroups.com> <87a8smdx1g.fsf@bsb.me.uk> <87oah2cbdw.fsf@bsb.me.uk> <0c49b342-756f-4e57-a4ab-ea60d011a622@googlegroups.com> <15e5217d-9101-4b82-bba5-f896c0f43279@googlegroups.com> <614f12fa-f874-479b-bf51-3f41fda410c9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="2183"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kql0hRvRcKkuCjqvnCdMi" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:pb0EP/S46iEgjABMktQN+jDgB/4= sha1:kI879t5kY2I9qz7ZWp+5LAMNuY0= Xref: csiph.com comp.lang.c:70829 David Brown writes: [...] > Take for example division by 0. Division of integers in C is > well-defined, and matches typical cpu hardware divide instructions, > except in the case of dividing by 0. INT_MIN / -1 also has undefined behavior on systems where INT_MIN < -INT_MAX. It's easy to forget that integer division can overflow. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"