Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: fast normalization

Author: Charles Roberson

Date: 08:08:43 10/31/03

Go up one level in this thread


>>     Algebra allows factoring out the 100/largest and creating a loop invariant
>>  constant. However, largest can be very big and we are using integer
>>  arithmetic. Thus, a large largest can make 100/largest = 0.
>
>
>make 100/largest a float.  let number stay an integer.  You end up with
>an integer result that will be what you expect.

   A good suggestion, but I was trying to avoid floating point arithmatic.
   Are you suggesting that FP multiplication is faster than my stated
   algorithm?

      The slow possibility is in the HighOrderBit() function. After that
    shift right is fast. Seems one call to HighOrderBit() would be faster
    than many FP multiplies.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.