Open dalxung opened 1 year ago
Hi sorry for the answer delay, I've been busy working on other projects.
First, we are not storing the constant parts of the coefficients, only the .xxxxx values. On the other hand, there might be misleading file names regarding the log2 function (use log2, instead of in2). You can find more details in the following reference paper regarding the use of different intervales (1,2) or (2,4) for reciprocal and rsqrt functions. J. . -A. Pineiro, S. F. Oberman, J. . -M. Muller and J. D. Bruguera, "High-speed function approximation using a minimax quadratic interpolator," in IEEE Transactions on Computers, vol. 54, no. 3, pp. 304-318, March 2005, doi: 10.1109/TC.2005.52.
Software used to generate coefficients ( maplesoft's maple software ) In SFU, each coefficient LUT ( c0, c1, c2 ), which is a coefficient array, is created with this bit range ( m = 6 ) , so the number of array elements is 64 ( 2^6 ). The data type sizes (bit array size) of c0, c1, and c2 to be stored are t, p, and q, respectively.
Quadratic polynomial c0, c1, c2 coefficient values sin(x), cos(x), rsqrt(x), log2(x), exp2(x), 1/x and sqrt(x)
Analyzing the format of coefficient LUT c0, c1, c2. For example, sin(x) is +0.xxxxx pattern, if C0 is the format If the first bit string is '+0'. Just connect them by adding +0 in front of the .xxxxx bit output stored in the LUT array. No need to store +0. You only need to save the xxxxx format.
When performing C2X2^2 + C1X2 + C0 ( C2(XH)XL^2 + C1(XH)XL + C0(XH) ) operation When m=7 X1 = XH, X2 = XL X1 = [. x1 x2 ... xm ] are used as LUT indices. X2 = [. xm+1 ... xn ] 2^-m. X2 = XL(number value set as bitstring) 2^-7