 # Israel Koren

Yüklə 605 b.
 tarix 05.03.2018 ölçüsü 605 b. • ## Second method: Taylor series expansion • ## Most commonly used methods: based on either polynomial or rational approximations • ## Approximations with smaller execution time exist • ## Linear convergence - m linear function of number of bits n • ## Also, multiplication by bi should be simple and fast

• Use the form bi =(1+si 2 ), where si  {-1,0,1}
• Multiplication reduced to shift and add
• ## The term ln bi=ln (1+si2 ) can be positive or negative

• Must ensure convergence of positive or negative xi+1 to 0 • ## For every x0 in interval there exists vector s guaranteeing convergence to 0 • ## If x0 positive fraction - simple scheme for selecting si - one-sided selection rule: si  {0,1}

• Similar to quotient-bit selection in restoring division
• ## In step i+1 form difference D=xi-ln (1+2 )

• If D positive or zero - set si=1 and xi+1=D
• If D negative - set si=0 and xi+1=xi
• ## Analyze subtract in xi+1 - examine Taylor series:

• At step i can cancel bit of weight 2 by subtracting ln (1+si 2 ) from xi
• Up to n steps needed to ensure convergence of n-bit fraction to 0 - convergence linear and m=n • ## More complex selection rules can be used as well • ## Yielding x11=0 • ## Approximation error=0.842·2 • ## 2 is easily dealt with

• Incorporation into exponent part of floating-point number
• Through a shift operation for fixed-point arithmetic • ## After m steps (multiplicative inverse) • ## ln x=ln x0+Ex ln 2 • ## xi+1 approaches 1  yi+1 converges to • ## xi+1 approaches 1  yi+1 approaches y0+ln x0 • ## Approximation error = 0.783·2 • ## Example:

• k=1 : yi+1  y0 / x0 - divide operation
• k=1/2 : yi+1  y0 /  x0 - reciprocal of square root
• y0=x0 : yi+1   x0 - square root calculated

• ## Multiplication by bi more complex - not efficient for square root extraction • ## where • ## Convergence domain for m  20 : (including 0  x0 /2 = 1.57) • ## Volder developed differently using rotations in polar system - CORDIC (COordinated Rotation DIgital Computer) • ## tan (si 2 )= si tan (2 )

• n constants stored in ROM

• ## For m > 16, K=1.6468 - set y0=1/K Zm =cos x0 ; Wm = sin x0 • ## Selection rule becomes

• Similar to rule for nonrestoring division
• ## Examine convergence rate of xi+1 to 0 - Taylor series expansion of tan (si2 ) (in radians):

• Linear convergence
• ## For i>n/3, all terms except first negligible - reduce size of ROM • ## Approximation error not larger than 2 Dostları ilə paylaş:

Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2019
rəhbərliyinə müraciət Ana səhifə