Thanks Malcolm. That's a handy programming tip. Regards
Paul On 3/11/06, Malcolm Smith <[EMAIL PROTECTED]> wrote: > It would be better to do the (a1*K + a2*K^2 + a3*K^3 + a4*K^4 + > a5*K^5) portion as follows, so that the power operator is not called. > > ( ( ( (a5 * K + a4) * K + a3) * K + a2) * K + a1) * K > > Not only will this be faster (possibly much faster) but it should > also be more likely. This is just the application of Horner's rule > to the polynomial. > > Cheers, > Malcolm Smith _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
