Directory of image this file is from
This file as a plain text file
*20 //SUBROUTINE ANTILOG /CALCULATES ANTILOG OF BASE 10 LOGARITHM HELD IN FLOATING POINT FORMAT /COMPUTED BY POLYNOMIAL APPROXIMATION OF FUNCTION E*X /IF LOG(A) = B /THEN A = 10*B = E*[<B><LN(10)>] /IF LET X = <B><LN(10)> /THEN E*X IS APPROXIMATED BY THE FOLLOWING POLYNOMIAL: / [1+A1(X)+A2(X*2)+A3(X*3)+A4(X*4)]*4 /WHERE A1,A2,A3&A4 ARE CONSTANTS ALOG, SET 3 0 FMUL LN10 STORE TEM /TEST FOR NEGATIVE EXPONENT FAPO JMP INVERT /POSITIVE - CONTINUE WITH POLYNOMIAL APPROXIMATION FOR E*X JMP DOALOG JMP 3 /EXPONENT IS NEGATIVE /USE SAME POLYNOMIAL APPROXIMATION, BUT INVERT RESULT /E*-X = 1\E*X INVERT, FMUL FM1 /MAKE EXPONENT POSITIVE STORE TEM JMP DOALOG RECIP FAC JMP 3 /ROUTINE TO DO POLYNOMIAL APPROXIATION DOALOG, FMUL A4 FADD A3 FMUL TEM FADD A2 FMUL TEM FADD A1 FMUL TEM FADD FP1 FMUL FAC FMUL FAC JMP 0 A1, 7775 /.24991035 3777 2100 A2, 7773 /.03158565 2012 7772 A3, 7767 /.00227723 2251 7313 A4, 7764 /.00026695 2137 5266 LN10, 2 /2.3026 2232 7346 FP1, 1 /1 2000 0 FM1, 1 /-1 5777 7777 TEM, 0 0 0 //END SUBROUTINE ANTILOG //JLB //16 FEB 77