# improved goldschmidt division method using mapping of divisors

Post on 23-Dec-2016

213 views

Embed Size (px)

TRANSCRIPT

. BRIEF REPORT .

SCIENCE CHINAInformation Sciences

September 2013, Vol. 56 099101:1099101:6

doi: 10.1007/s11432-013-4996-1

c Science China Press and Springer-Verlag Berlin Heidelberg 2013 info.scichina.com www.springerlink.com

Improved Goldschmidt division method usingmapping of divisors

YAN Wen1, QU XiuJie1, CHEN He1, YU JiYang2 & LONG Teng1

1School of Information and Electronics, Beijing Institute of Technology, Beijing 100081, China;2The Electronic Engineering Technology Research Center of China Academy of Space Tech, Beijing 100094, China

Received May 23, 2013; accepted July 18, 2013

Abstract To achieve high precision with fewer storage resources, an improved Goldschmidt division method

of using the mapping of divisors is presented. The improved division method does not need the initial approxi-

mation, which means that the look-up table can be saved. Then a mapping method is proposed to reduce the

relative errors of the iteration results through multiplying the dividends and divisors by the mapping coecients

simultaneously. Since the mapping coecients are all xed factors, the mapping method applies CSD coding in

the multiplication with xed factors to reduce the hardware resources. Finally, using fewer hardware resources,

the proposed method can achieve smaller relative errors.

Keywords Goldschmidt division method, mapping of divisors, CSD coding, multiplication with xed factors,

fewer hardware resources

Citation Yan W, Qu X J, Chen H, et al. Improved Goldschmidt division method using mapping of divisors. Sci

China Inf Sci, 2013, 56: 099101(6), doi: 10.1007/s11432-013-4996-1

1 Introduction

Floating-point division is now more and more popular in scientic and engineering applications. Although

division is not used as frequently as addition and multiplication, it aects the performance of computation

results a lot. The division algorithm is usually based on the iterations of multiplication. Newton-

Raphson [1,2] and Goldschmidt [35] division are the most popular iteration algorithms. We usually

choose Goldschmidt algorithm instead of Newton-Raphson algorithm due to its higher intrinsic parallelism

[6], which leads to less execution times.

Many researchers have tried to reduce the computation time of division by convergence, and the

most popular approach is to reduce the number of iterations by increasing the precision of the initial

approximation to the reciprocal, thus needing to increase the digit numbers of the look-up table. Then

the storage resources will grow accordingly in an exponential manner. Since the storage resources of a

system is usually limited, it is important to save the table area.To reduce the area for the reciprocal table,

some methods have been suggested. For example, a Goldschmidt division method is proposed in [5] with

faster than quadratic convergence, which can achieve faster convergence speed with fewer table areas.

Corresponding author (email: quxiujie@bit.edu.cn)

Yan W, et al. Sci China Inf Sci September 2013 Vol. 56 099101:2

Although the proposed method in [5] can reduce the table area, it still needs to increase the storage

resources when the precision requirement is very high. To achieve high precision using fewer storage

resources, an improved Goldschmidt division method of using mapping of divisors is proposed. This

method does not need the initial approximation, thus saving the look-up table. The proposed method

has smaller relative errors than the conventioal Goldschmidt method and the DFQC method in [5].

Besides, the mapping of divisors is equivalent to the multiplication with xed factors. And CSD coding

is applied to reduce the multiplication resources [7].

The main contribution of our method is that it has saved the initial approximation and can achieve

high precision with fewer storage resources. In Sections 2, the improved Goldschmidt division method

using mapping of divisors is explained in detail. Then some analysis on the errors and resources is made in

Section 3 and Section 4. And results of the new design are compared with other methods to demonstrate

its better performance. Our conclusion is given in Section 5.

2 Divisor mapping GLD method

Division can be written as Q = N/D, where N is the numerator, D is the denominator and Q is

the quotient. The principle of the Goldschmidt division method is to multiply the numerator and the

denominator with a group of factors Fi at the same time to make the denominator close to 1, such that

the numerator is close to the quotient [3,8]. Details on the conventional Goldschmidt division method can

be seen in [3,5]. Results of the conventional GLD division method can be achieved through the following

equations

Fi+1 = 2Di+1,Ni+1 = NiFi,

Di+1 = DiFi,

(1)

where i = 0, 1, 2, . . . ,M 1, M represents the iteration times and M 1. Ni and Di represent thedividend and divisor after the ith iteration respectively. Here N0 = N , D0 = D, and F0 is produced by

a reciprocal table with limited precision, which has an initial error s.

We know that the conventional Goldschmidt division method needs to store the initial approximations

in a look-up table before implementation. However, to improve the precision of the initial approximation,

it needs to increase the number of digits of the look-up table. Then the storage resources will grow

accordingly in an exponential manner.

2.1 Improved GLD method

In this paper, an improved division method, named the Divisor Mapping GLD (Goldschmidt Division)

method is proposed, which doesnt need the initial approximation. Instead, it needs to preprocess the

dividends and divisors using the mapping method before the iterations.

We reform the iteration equations as follows

Fi = 2Di,Ni+1 = NiFi,

Di+1 = DiFi,

(2)

where i = 0, 1, . . . ,M 1, M represents the iteration times and M 1. Here, N0 = N , D0 = D. We cannd that F0 = 2D, so the Divisor Mapping GLD method does not need the initial approximation.

With the rst and the third equations in (2), we can get

Di+1 1 = (D 1)2i+1 . (3)

With (3), we can get

Ni+1 =N

DDi+1 =

N

D

[1 (D 1)2i+1

]. (4)

Yan W, et al. Sci China Inf Sci September 2013 Vol. 56 099101:3

When the divisor is close to 1, the quotient is approximately equal to the dividend. After the Mth

iteration, the quotient QM can be expressed as

QM NM = ND

[1 (D 1)2M

]. (5)

Dene the relative error as

ei+1 = abs

(Qi+1 N/D

N/D

)

. (6)

Combining (5) and (6), the relative error of results after the M th iteration is

eM = (D 1)2M . (7)For the oating system, N and D can be expressed in the scientic notation as 1.F 2G, where F and

G stand for the mantissa and the exponent respectively. Obviously, we can get the division results by

the exponent subtract and the mantissa divide. Then the normalized N and D are both in [1, 2).

From (7), we can see that the improved GLD method still achieves quadratic convergence. But the

relative error of results has nothing to do with the initial approximation. When the iteration time M

is xed, the relative error will increase with the increasing divisor. So the closer D is to 2, the larger

the relative errors are. Then we have proposed a divisor mapping method, which can reduce the relative

errors of the improved GLD method.

2.2 Mapping of divisors

Assume the precision requirement to be E. If we want to meet the precision requirement, the divisors

should satisfy eM E. Then we can get

D 10lgE/2M + 1 = p. (8)

Here, p is the largest divisor which can meet the precision requirement, and p [1, 2]. From theabove analysis, we can nd that only when the divisor p [1, p], can it meet the precision requirement.Then the question is how to accommodate the divisors in the interval of (p, 2). Our approach is to map

divisors in (p, 2) onto [1, p].

When p 1.5, we just need one mapping. Then the divisors in (p, 2) can be mapped onto [1, p]through multiplying a xed factor. When D (p, 2), we can dene a mapping coecient (0.5, 1)to get D = D, N = N, where N and D represent the dividend and the divisor after mappingrespectively. Here, D [1, p]. We can guarantee results of all divisors to meet the precision requirementby converting N/D into N /D.

But when p < 1.5, it is hard to accomplish the process with just one mapping, and so we need to map

for several times. We assume the mapping times as T. That is to say, the interval (p, 2) is divided into

T sections. The interval of the ith mapping is recorded as (Range(i,min),Range(i,max)], here i = 1, . . . , T .

The relationship of all the intervals should satisfy

Range(0,min) = p,

Range(i1,max) = Range(i,min),

Range(T1,max) = 2.

(9)

Assume the coecient of every mapping to be C = {c(1), c(2), . . . , c(T )}. Then we can get{

c(i)Range(i,max) = p,

c(i)Range(i,min) = 1,(10)

Combining (9) and (10), we have the following mapping coecients:

Range(i,max) =2

pT1i ,

Range(i,min) =2

pTi ,

c(i) = pTi

2 .

(11)

Yan W, et al. Sci China Inf Sci September 2013 Vol. 56 099101:4

1.0 1.2 1.4 1.6 1.8 2.0350

300

250

200

150

100

50

0

D

Rel

ativ

e er

rors

(dB)

E

Before mappingAfter mapping

Figure 1 Relative errors before and after the mapping method.

To make

Recommended