Name: LOG2NRM.ASM Type: Assembler Macro Version: 1.0 Date Entered: 30-Mar-87 Last Change: 30-Mar-87 Description: Normalizing Base 2 Logarithm Macro This program calculates the base 2 logarithm of an unnormalized 24 bit fraction "x" in register A and returns a scaled fraction "y" in register A. y = log2(x)/32.0 where 2**(-23) =< x < 1.0 -23/32 =< y < 0.0 Note - "x" must be a non-zero, positive fraction. Three steps are required. 1. Normalize "x" so that 0.5 =< A < 1.0. 2. Calculate the log2(A). 3. Divide the result by 32.0 This macro uses a modified version of the log2 library macro.