From: Ben Tilly Date: 2001-01-03T06:49:50+09:00 Subject: [ruby-talk:8543] Re: speedup of anagram finder "Christoph Rippel" wrote: > > > This allows us to come up with a hashing function using floating > > point numbers. The only issue is what point we will get into > > pain from round-off errors. >Actually round-off errors are a major issue (in theory and practice) - >floating point arithmetic is not associative - this idea breaks down if >words.lenght > 2. In theory, yes. In practice if you round reasonably, it will work. Of course the more you round, the sooner you get to a false positive. I said the idea was sick? Sick but likely to work in a practical situation. (That said, *I* would not want to rely on such code in production...) Cheers, Ben _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com