- BKM algorithm
The BKM algorithm is a
shift-and-add algorithm for computing elementary functions, first published in1994 by J.C. Bajard, S. Kla, and J.M. Muller. BKM is based on computing complexlogarithm s and exponentials using a method similar to the algorithm Henry Briggs used to compute logarithms. By using a precomputed table of logarithms of negative powers of two, the BKM algorithm computes elementary functions using only integer add, shift, and compare operations.BKM is similar to
CORDIC , but uses a table of logarithms rather than a table of arctangents. On each iteration, a choice of coefficient is made from a set of nine complex numbers, 1, 0, −1, i, −i, 1+i, 1−i, −1+i, −1−i, rather than only −1 or +1 as used by CORDIC. BKM provides a simpler method of computing some elementary functions, and unlike CORDIC, BKM needs no result scaling factor. The convergence rate of BKM is approximately one bit per iteration, like CORDIC, but BKM requires more precomputed table elements for the same precision because the table stores logarithms of complex operands.As with other algorithms in the shift-and-add class, BKM is particularly well-suited to hardware implementation. The relative performance of software BKM implementation in comparison to other methods such as
polynomial or rational approximations will depend on the availability of fast multi-bit shifts (i.e, abarrel shifter ) or hardwarefloating point arithmetic.References
*J.C. Bajard, S. Kla, and J.M. Muller. [http://perso.ens-lyon.fr/jean-michel.muller/BKM94.pdf BKM: A new hardware algorithm for complex elementary functions] . IEEE Transactions on Computers, 43(8): 955-963, August 1994
*J.M. Muller, Elementary Functions: Algorithms and Implementation, 2nd Ed. Birkhauser 2006
Wikimedia Foundation. 2010.