Nicholas Clark <[EMAIL PROTECTED]> writes: > >I was told (by someone at the German Perl Workshop, and I forget who, sorry) >that there is an algorithm (in Knuth) for evaluating (a+b) * (c+d) in 3 >multiplies, not 4, for whenever multiplication is considerably slower than >addition.
I know my algebra instruction was over two decades ago but (a+b) * (c+d) seems to need two adds and ONE multiply. >(Well, strictly it's just algebra and a clever way of rewriting >a*c + a*d + b*c + b*d but if you're not using it yet, it could be useful. >I see a couple of comments about "from Knuth..." in BigInt::Calc but they >don't seem to be this one) > > >Nicholas Clark -- Nick Ing-Simmons http://www.ni-s.u-net.com/