JPS61262930A - Dividing device - Google Patents

Dividing device

Info

Publication number
JPS61262930A
JPS61262930A JP60105531A JP10553185A JPS61262930A JP S61262930 A JPS61262930 A JP S61262930A JP 60105531 A JP60105531 A JP 60105531A JP 10553185 A JP10553185 A JP 10553185A JP S61262930 A JPS61262930 A JP S61262930A
Authority
JP
Japan
Prior art keywords
circuit
initial value
supplied
divisor
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP60105531A
Other languages
Japanese (ja)
Inventor
Ken Hayamizu
速水 謙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP60105531A priority Critical patent/JPS61262930A/en
Publication of JPS61262930A publication Critical patent/JPS61262930A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform the division at a high speed with use of a small number of memories by providing a pre-processing circuit, an address generating circuit, an initial value memory, etc. and also using the optimum initial value. CONSTITUTION:A divisor alpha and a dividend beta are supplied to a pre-processing circuit 2 of a dividing circuit and a mantissa part (a) of the divisor alpha is delivered. At the same time, the product beta.P<-e> of an inverted exponent part P<-e> of an exponent part P<e> of the divisor alpha and the dividend beta is delivered. Then the upper m-digits of the part (a) is delivered from an address generating circuit 4 which supplies the part (a) from the circuit 2. the output of the circuit 4 is supplied to an initial value memory 6 and the initial value X0 of the mem ory 6 is applied to an arithmetic circuit 8. The circuit 8 performs an operation Xn=Xn-1(2-aX0-1) between the value X0 and the part (a). Then a multiplier 11 multiplies the product beta.P<-e> given from the circuit 2 by the output of the circuit 8. Thus a high-speed division is carried out.

Description

【発明の詳細な説明】 (産東上の利用分野) 本発明は、例えば計算機等において,2つの浮動小数点
数の曲を,乗算及び加減算のみを用いて要求される精度
まで求めるだめの除算方式である。
[Detailed Description of the Invention] (Field of Application of Santo) The present invention is a division method for calculating two floating point numbers to the required precision using only multiplication and addition/subtraction, for example in a computer. be.

(従来技術) 従来は,オツトー・スパニ日ル( Otto 8pan
iol)著、[コンピューター・アリスメティック,ロ
ジッジ・アンド・デザイン( Computor Ar
ithmeticLogic and Design 
) J,  ジョン●ワイリー●アトド・サンズ( J
ohn Wiley & 8ons )社,l73〜1
91ページにある様な方法をとっていた。
(Prior art) Conventionally, Otto 8pan
iol), Computer Arithmetic, Logige and Design (Computer Ar
itmeticLogic and Design
) J, John ● Wiley ● Atodo Sons ( J
Ohn Wiley & 8ons), l73~1
I used the method shown on page 91.

つまり商β/αを求めるのにiを,αの仮数部aの逆数
−を、ある範囲に対してf (X)=− 一a = 0
をXの初期値X から出発してニュートン法により求め
ていた。
In other words, to find the quotient β/α, i is the reciprocal of the mantissa part a of α, and for a certain range, f (X) = - 1a = 0
was determined by Newton's method starting from the initial value of X.

(従来技術の問題点) 従来の方法では,初期値X。とじて最適なものが用いら
れていなかった0例えば2進表示で2 <a〈1に対し
て逆数を求めるのに,逆数の正量1〈1く2の左端のイ
直x0:1をニー−トン法の出発値としている。これは
最大誤差の意味でも.平均誤差の意味でも最適ではなく
、必要以上の反復数、または初期値X。のテーブルとし
て必要以上のメモリーを用いなければならない口 (発明の目的) 本発明は、上記の問題点を解決するために正量内での最
適な初期値X。を採用し、より高速でより少ないメモリ
ーで除算を行なう除算装憶を提供することを目的とする
コ (発明の構成) 本発明によれば。
(Problems with conventional technology) In the conventional method, the initial value X. For example, to find the reciprocal of 2 < a < 1 in binary notation, we need to find the leftmost i-direction x 0:1 of the positive quantity 1 < 1 × 2 of the reciprocal. - Used as the starting value for the ton method. This also means maximum error. It is not optimal in the sense of average error either, the number of iterations is more than necessary, or the initial value X. (Objective of the Invention) The present invention solves the above problem by determining the optimal initial value X within a fixed amount. According to the present invention, it is an object of the present invention to provide a division storage that employs the above method and performs division at higher speed and with less memory.

(−1除数α、被除数βが入力され、αの仮数部aを出
力するとともにαの指数部peの符号を反転したp−8
とβとの積β・p−eを出力する前処理回路。
(-1 divisor α and dividend β are input, output the mantissa part a of α, and invert the sign of the exponent part pe of α, p-8
A preprocessing circuit that outputs the product β·pe of β and β.

(b)、前記aが入力され、aの上位m桁(mは整数)
を出力するアドレス発生回路。
(b), the above a is input, and the upper m digits of a (m is an integer)
Address generation circuit that outputs.

(cl。前記アドレス発生回路出力が供給され初期値x
0を出力する初期値メモリ。
(cl. The output of the address generation circuit is supplied and the initial value x
Initial value memory that outputs 0.

(d)、前記Xo及び前記aが供給され、Xn’:”X
n−1(’2−axn−1)なる演算を行なう演算回路
(d), the Xo and the a are supplied, and Xn': "X
An arithmetic circuit that performs an operation n-1 ('2-axn-1).

(c)、前記β・p−e及び前記演算回路出力とを乗算
する乗算器、 とから構成される装置 ゛ (発明のノ収埋) 浮動小数点数β,α(α/o)の商β/αを求めるも0
)とする、α/0の場合は(一β)/(一α)として計
算する。
(c) a multiplier that multiplies the β·pe and the output of the arithmetic circuit; /α is found but 0
), and in the case of α/0, it is calculated as (1β)/(1α).

α〉0とし,p進表示(pは正の整数)でcl α”aXp  、  −く龜<1        tt
l仮数部aはp進n桁とする3つまり でaiは整数で0くaiくp−1(t■しai〆0)、
eは指数部であるり 第2図の様に除数αの逆数dを求め,被除数βとの乗算
によ)、曲β/αを求める。
Let α〉0, and in p-adic representation (p is a positive integer) cl α”aXp, -ku <1 tt
The mantissa part a is p-adic n digits. 3 In other words, ai is an integer 0 x ai x p-1 (t■ and ai〆0),
e is the exponent part (as shown in FIG. 2), find the reciprocal d of the divisor α, and multiply it by the dividend β) to find the curve β/α.

αの逆数は,αの仮数部aの逆数−と、指数部eの符号
を反転する事により。
The reciprocal of α is obtained by inverting the reciprocal of the mantissa part a of α and the sign of the exponent part e.

よシ得る。Good luck.

( a (1 01範囲にある仮数部aの逆数を求める
のにaの仮数部の上位m桁を続み,その値に対してあら
かじめ用意してある初期値のテーブルから8に対応する
初期値1 を読む,但し,初期イ直テーブルは一から間隔δごとに
1一δまでのSの値に対してX。の値を用意している,
ここでOくδく1−一である。
(a (1 To find the reciprocal of the mantissa part a in the 01 range, continue with the upper m digits of the mantissa part of a, and find the initial value corresponding to 8 from the table of initial values prepared in advance for that value. 1, however, the initial direct table prepares the values of
Here Okuδku1-1.

次に第2図の様にX。を初期値として、反復x&=xl
−1 ( 2  axj−1 )  i=l, 2g 
・・・、 k (6)を必要な回数にだけ行う。
Next, make an X as shown in Figure 2. As the initial value, iterate x&=xl
-1 (2 axj-1) i=l, 2g
..., k (6) is performed only as many times as necessary.

−1くε(c〉0は必要とされる精度)となる様にとる
。あるいは(6)の計nを行うたびにj Xi−Xl−
1jを計算し,Cより小さくなう友ところで反復を終了
する様にする。
-1 x ε (c>0 is the required accuracy). Or, every time (6) is performed, j Xi−Xl−
1j is calculated, and the iteration is stopped when it becomes smaller than C.

倚られたxkそ一の値として求める藺 介=βX xk X p−e(7) を侍る。What is the value of xk that was swallowed? Intermediate = βX xk X p-e (7) attend.

0 < s <、 a <、 s十δなるaの逆数Xを
求めるのに =1一 fhrl  xa=0           (81と
なるXをニュートン法 最適値は后1<x。<ーの軛囲に存在する。
0 < s <, a <, To find the inverse number do.

i回目の反復時の’xiの誤差61は 1           ’         1εt
(a+xo)””l”i]l””lXt−t(2 aK
,−t)一τ1一責1・1−・→1′→・i−、 エa2’l, 、、、、2 −1( xo+−1 )2
’次に誤差の平均について評価してみる。
The error 61 of 'xi at the i-th iteration is 1' 1εt
(a+xo)""l"i]l""lXt-t(2 aK
, -t) 1τ1 1・1−・→1′→・i−, Air a2′l, ,,,,2 −1( xo+−1 )2
'Next, let's evaluate the average error.

aはsくaくs+δで一様に分布しているとすると、x
、の誤差の期待値は 7、(xO)=8f:+aεH(a、xo)da(m+
a ) go−1〉0 、1−sxo>0だから、従っ
て平均誤差’1(xo)い=1.2.・・・)は■ 次にsくaくs+δでのXiの最大誤差El(xo)=
max    g((a、xo)f論するコ−(:、a
(−s十δ (10)式よル 従って。
Assuming that a is uniformly distributed as s×s+δ, then x
, the expected value of the error is 7, (xO)=8f:+aεH(a,xo)da(m+
a) Since go-1>0 and 1-sxo>0, the average error '1(xo)=1.2. ...) is ■ Next, the maximum error of Xi at s + δ El (xo) =
max g((a, xo)f(:, a
(-s0δ According to equation (10), therefore.

従って、最大誤差はa=sかa == B+δでおこる
Therefore, the maximum error occurs at a=s or a==B+δ.

・そこでDB(xo)=6r (r−十J −x o)
−εI(j、xo)とおくと。
・So DB(xo) = 6r (r - 1 J - x o)
-εI(j, xo).

フ〈xo<マではx。(s+δ)−1>0及びx。5−
1(従って、 従うて Ei(X6)=max  εi (a e to )s
 <a<s −1−8 従ってxiの最大誤算Fli(Xo)はX。=xo*で
最小値をとる。
x in fu〈xo〉ma. (s+δ)-1>0 and x. 5-
1 (Therefore, Ei (X6) = max εi (a e to )s
<a<s −1-8 Therefore, the maximum miscalculation Fli(Xo) of xi is X. Take the minimum value at =xo*.

だから 小とみなして艮い。that's why It is treated as small.

(実施例) 第1図は本発明の一実施例を示すブロック図である口 同図において、信号#J1より除数α、被除数βが前処
理回路2に供給されるO前処理回路2においてはαの仮
数部aを取り出し信号線3を介してアドレス発生回路4
1及び演算回路8に供給するOまた前処理回路2は、α
の指数部eの符号部を反転した値p−eとβとの積β×
p−eを信号N10により乗算器11に供給する0 アドレス発生回路4は、信号線3により供給されたαの
仮数部aの上位m桁を取り出し、初期値メモリ6へアド
レス信号として供給する。初期値メモリ6には、′fJ
2図を用いて説明した初期値X。
(Embodiment) FIG. 1 is a block diagram showing an embodiment of the present invention. In the same figure, in the preprocessing circuit 2, the divisor α and the dividend β are supplied to the preprocessing circuit 2 from the signal #J1. The mantissa part a of α is taken out and sent to the address generation circuit 4 via the signal line 3.
1 and the arithmetic circuit 8. Also, the preprocessing circuit 2 supplies α
The product β×
The 0 address generation circuit 4 which supplies pe to the multiplier 11 by the signal N10 takes out the upper m digits of the mantissa part a of α supplied by the signal line 3 and supplies them to the initial value memory 6 as an address signal. The initial value memory 6 contains 'fJ
Initial value X explained using Figure 2.

のテーブルメモリがiiFき込まれており、信号線5に
より供給されるアドレスにしたがって初期値X。
A table memory of iiF is loaded, and the initial value X is set according to the address supplied by the signal line 5.

を、演算回路8に出力する。is output to the arithmetic circuit 8.

演算回w!I8においては、信号Ifli!3によりa
か、信号線7によりX。が供給されており、まずxl=
xo(2−axo)なる演算が行なわれ、結果が信号線
9により、乗算器11に出力される。また演算結果は信
号線9により演算回路8にフィードバックされ、次の逐
次計算に供される。乗算器11においては、信号線lO
より供給されるβ×p−eと。
Calculation time lol! At I8, the signal Ifli! a by 3
Or X by signal line 7. is supplied, and first xl=
An operation xo(2-axo) is performed, and the result is output to the multiplier 11 via the signal line 9. Further, the calculation results are fed back to the calculation circuit 8 through the signal line 9, and are used for the next sequential calculation. In the multiplier 11, the signal line lO
β×pe supplied by

信号#!9により供給される−の近似値との乗算がなさ
れ、除算結果β/αの近似値が信号線12に出力される
〇 ここで第2図で2進の数表現(p=2 )の場合を考え
、仮数部の桁数n=24とする。仮数部の逆数の要求さ
れる精度は2  キロ、0X10  と考えるO 第2図の初期値X。のテーブルメモリーを十分大きくと
り1反復1回(k=1 )で2 <a (lなる仮数部
aに対して逆数を求めてみる0 本発明による場合、用量s <a (s+δに対し従っ
てδ−2−13ととれば全ての場合に精度の要求は充さ
れる。従って紀2図で…−13つまり仮数部aの上位1
3桁の値を読めばよい0デープルメそり−と1.てVi
責くS<1でδ−2きざみには−÷2−13=212=
4096で十分でちる。
signal#! 9 is multiplied by the approximate value of - supplied by 9, and the approximate value of the division result β/α is output to the signal line 12 〇Here, in the case of binary number representation (p = 2) in Figure 2 Considering this, the number of digits in the mantissa part is set to n=24. Consider the required precision of the reciprocal of the mantissa to be 2 kilos, 0x10.O Initial value X in Figure 2. Let's take a sufficiently large table memory and calculate the reciprocal for the mantissa part a of 2 < a (l) in one iteration (k = 1). In the case of the present invention, the dose s < a (for s + δ, therefore δ -2-13 satisfies the accuracy requirement in all cases. Therefore, in Ki 2 diagram...-13, that is, the upper 1 of the mantissa part a.
0 dimple mesori, which only requires reading a 3-digit value, and 1. TeVi
For S<1, in δ-2 increments, -÷2-13=212=
4096 is enough.

一方、従来の方式で、初期凪として例えばxo−石コを
とると、最大誤差 とするには少くともδ=2  としなくてはならl 。
On the other hand, in the conventional method, if we take, for example, xo-seki as the initial calm, we must set at least δ=2 to obtain the maximum error l.

ずテーブルサイズは百τ2   =2  =8192と
なり1曲射本発1り」O)2倍のメモリーを必要とする
The table size will be 100τ2 = 2 = 8192, which means that one song will be shot one time.O) Double the memory will be required.

次に2進24桁で要求精度は2  とする。第2図で−
z<、a< 1なる仮数部aの逆数を求めるの(s:;
、δ−7)でニー−トン法の反復を必要な回数に行う構
成をとる。
Next, the required precision is 2 with 24 binary digits. In Figure 2 -
Find the reciprocal of the mantissa part a such that z<, a<1 (s:;
, δ-7), the Neaton method is repeated as many times as necessary.

従来のものとしてはX。=−=1.Of考える。The conventional one is X. =-=1. Of thinking.

、、1 δ 仮数部aが2 <a (lで一体に分布しているとして
(数値積分により)求めたx1θJ平均誤差を表1に示
す。また表2にX10′)最大誤差を示す。
,,1 δ The mantissa part a is 2 < a (Table 1 shows the average error of x1θJ obtained (by numerical integration) assuming that the mantissa part a is uniformly distributed with l. Also, Table 2 shows the maximum error of X10′).

以子71・パ白 〔表1〕i回反復時の平均誤差 !、(Xo)〔表21
i回反復時の最大誤差 E H(x o )表1. 2
かられかる様にPhf望の種度2  を達成するのに本
発明の方法によれば4回の反復で十分である〇一方、従
来の方法によると5回の反復が必費で、酸N針は本発明
の方法の2割増である。
Iko 71/Pahaku [Table 1] Average error when repeated i times! , (Xo) [Table 21
Maximum error during i iterations E H (x o ) Table 1. 2
According to the method of the present invention, four repetitions are sufficient to achieve the desired Phf species degree of 2, whereas in the conventional method, five repetitions are necessary, and the acid N needles are 20% more than the method of the present invention.

(発明の効果) 以上述べた通り、本発明によれば最適な初期値を用いる
ことができるため、高速な除算を行なうことができる除
算装置を提供することができる0
(Effects of the Invention) As described above, according to the present invention, an optimal initial value can be used, so a division device capable of performing high-speed division can be provided.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示すブロック図、第2図は
本発明の詳細な説明するための図である。 図において。 2・・・前処理回路、4・・・アドレス発生回路、6・
・・初期値メモリ、8・・・演算回路、11・・・乗算
器、をそれぞれ示す〇 州 2 図 dの数8滉
FIG. 1 is a block diagram showing one embodiment of the invention, and FIG. 2 is a diagram for explaining the invention in detail. In fig. 2... Preprocessing circuit, 4... Address generation circuit, 6.
... Initial value memory, 8... Arithmetic circuit, 11... Multiplier, respectively. 2 Number 8 in Figure d

Claims (1)

【特許請求の範囲】 (a)、除数α、被除数βが入力され、αの仮数部aを
出力するとともにαの指数部p^eの符号と反転したp
^−^eとβとの積β・p^−^eを出力する前処理回
路、(b)、前記aが入力され、aの上位m桁(mは整
数)を出力するアドレス発生回路、 (c)、前記アドレス発生回路出力が供給され初期値x
_oを出力する初期値メモリ、 (d)、前記x_o及び前記aが供給されx_n=x_
n_−_1(2−ax_n_−_1)なる演算を行なう
演算回路。 (e)、前記β・p^−^e及び前記演算回路出力とを
乗算する乗算器、 とから構成される除算装置。
[Scope of Claims] (a) A divisor α and a dividend β are input, and the mantissa part a of α is output, and p is inverted from the sign of the exponent part p^e of α.
a preprocessing circuit that outputs the product β p^-^e of ^-^e and β; (b) an address generation circuit that receives the above a and outputs the upper m digits of a (m is an integer); (c), the output of the address generation circuit is supplied and the initial value x
an initial value memory that outputs _o, (d), the x_o and the a are supplied, and x_n=x_
An arithmetic circuit that performs an operation n_-_1 (2-ax_n_-_1). (e) a multiplier that multiplies the β·p^-^e and the output of the arithmetic circuit;
JP60105531A 1985-05-17 1985-05-17 Dividing device Pending JPS61262930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60105531A JPS61262930A (en) 1985-05-17 1985-05-17 Dividing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60105531A JPS61262930A (en) 1985-05-17 1985-05-17 Dividing device

Publications (1)

Publication Number Publication Date
JPS61262930A true JPS61262930A (en) 1986-11-20

Family

ID=14410170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60105531A Pending JPS61262930A (en) 1985-05-17 1985-05-17 Dividing device

Country Status (1)

Country Link
JP (1) JPS61262930A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6453277A (en) * 1987-05-08 1989-03-01 Sun Microsystems Inc Apparatus and method for obtaining approximate value of inverse of same order coordinates used for display of video on display device
WO1990005335A1 (en) * 1988-11-04 1990-05-17 Hitachi, Ltd. Apparatus for multiplication, division and extraction of square root
JPH02227726A (en) * 1989-01-13 1990-09-10 Internatl Business Mach Corp <Ibm> Apparatus and method for executing floating point division

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6453277A (en) * 1987-05-08 1989-03-01 Sun Microsystems Inc Apparatus and method for obtaining approximate value of inverse of same order coordinates used for display of video on display device
WO1990005335A1 (en) * 1988-11-04 1990-05-17 Hitachi, Ltd. Apparatus for multiplication, division and extraction of square root
JPH02227726A (en) * 1989-01-13 1990-09-10 Internatl Business Mach Corp <Ibm> Apparatus and method for executing floating point division

Similar Documents

Publication Publication Date Title
US6779012B2 (en) Computer method and apparatus for division and square root operations using signed digit
Ercegovac et al. Reciprocation, square root, inverse square root, and some elementary functions using small multipliers
Borwein et al. Ramanujan, modular equations, and approximations to pi or how to compute one billion digits of pi
EP0421092B1 (en) Method and apparatus for performing mathematical functions using polynomial approximation and a rectangular aspect ratio multiplier
US3633018A (en) Digital division by reciprocal conversion technique
US5307303A (en) Method and apparatus for performing division using a rectangular aspect ratio multiplier
US4466077A (en) Method and apparatus for division employing associative memory
Arnold et al. Redundant logarithmic arithmetic
Hung et al. Fast division algorithm with a small lookup table
JPS60164837A (en) Divider
JPH0776916B2 (en) Trigonometric function calculation device using pseudo division method
GB1519095A (en) Multiplying device
US3813529A (en) Digital high order interpolator
JPS61262930A (en) Dividing device
Rodrigues et al. Hardware evaluation of mathematical functions
EP0476911A2 (en) Multiplier signed and unsigned overflow flags
US3982112A (en) Recursive numerical processor
Bivins et al. Significance arithmetic: application to a partial differential equation
Harber et al. Bit-serial CORDIC circuits for use in a VLSI silicon compiler
US3254204A (en) Digital divider for integer and remainder division operations
Krishnamurthy Economical iterative and range-transformation schemes for division
JPH04195523A (en) Square root calculating device
Turner The distribution of lsd and its implications for computer design
Denman Computer generation of optimized subroutines
Bellman Eugene L. Lawler, Combinatorial optimization: networks and matroids