December 2012
Intermediate to advanced
631 pages
13h 10m
English
Steve Hill, University of Kent, Canterbury, Kent, United Kingdom
This chapter presents a reimplementation of the fast square-root algorithm. It discusses an extra routine that allows the table of square roots to be dumped as C source. The new routine uses IEEE double-precision floating-point format and includes a number of useful defines to make the program more accessible. On some architectures, the order of the words is reversed. The constant MOST_SIG_OFFSET can be set to either one or zero to allow for that fact. The table size can be adjusted by changing the constant SQRT_TAB_SIZE. It must be a power of four. The constant MANT_SHIFTS has to be adjusted accordingly—if the table size is quadrupled, ...
Read now
Unlock full access