JPS58155456A - information processing equipment - Google Patents
information processing equipmentInfo
- Publication number
- JPS58155456A JPS58155456A JP57038016A JP3801682A JPS58155456A JP S58155456 A JPS58155456 A JP S58155456A JP 57038016 A JP57038016 A JP 57038016A JP 3801682 A JP3801682 A JP 3801682A JP S58155456 A JPS58155456 A JP S58155456A
- Authority
- JP
- Japan
- Prior art keywords
- value
- register
- quotient
- division
- divisor
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/52—Multiplying; Dividing
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
Abstract
Description
【発明の詳細な説明】
本発明は、電子計算機の演算命令により、浮動小数点数
の除算の商と剰余を汎用レジスタ等の上に与える情報処
理装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an information processing device that provides a quotient and a remainder of a division of a floating point number onto a general-purpose register or the like based on an arithmetic instruction of an electronic computer.
この種情報処理装置における突数僅の演算は浮動小数点
によるのが通例である。従来の浮動小数点除算は、結果
として要求される梢度までの除算を行なって商を得るも
のであり、剰余は得られない。しかしながら、商を整数
値として得られるまで計算した場合の剰余全必要とする
場合がある。In this type of information processing apparatus, arithmetic operations on a uniform number are usually performed using floating point numbers. In conventional floating-point division, a quotient is obtained by dividing up to the required degree, and no remainder is obtained. However, there are cases where the entire remainder is required when the quotient is calculated until it is obtained as an integer value.
これを求めるために、従来は1例えば、(米国特許第3
,871,578号)に示す装置を用いることができる
。このような従来の装置では、本来除数であるべき数の
逆数を乗数とする乗算を行ない、この整数部と小数部と
全分離して、それぞれを演算結果とするものである。し
かしこの計算は本質的に近似法であるため、正確な剰余
を必要とする計算には使用できない。In order to obtain this, conventionally, for example, (U.S. Patent No. 3
, 871, 578) can be used. In such a conventional device, multiplication is performed using the reciprocal of a number that should originally be a divisor as a multiplier, and the integer part and decimal part are completely separated and each is used as an operation result. However, since this calculation is essentially an approximation method, it cannot be used for calculations that require an exact remainder.
すなわち、従来は除数の逆数を乗数とする乗算を行なっ
ているので、一般に除数が正しく浮動小数点数として表
わされていても、逆数の浮動小数点数懺現は正しい値を
費わし得ない。これが近似計算である理由の第1である
。次に、除数の逆数との積の値の小数点位置以上の整数
部は正しい商を表わしているが、積の値の小数点位置以
下の小a部&′X%このtまでは剰余を表わさず、この
値と除数との積が剰余である。この剰余を求める演算に
よって誤差が生じることが、近似計算である理由の第2
でおる。従来は1以上の2つの理由により、近似計算を
行なうに過ぎず、正確な剰余を得ることができなカ1つ
几。That is, conventionally, multiplication is performed using the reciprocal of the divisor as a multiplier, so even if the divisor is generally correctly represented as a floating point number, the floating point representation of the reciprocal cannot be used as a correct value. This is the first reason why it is an approximate calculation. Next, the integer part above the decimal point of the product value with the reciprocal of the divisor represents the correct quotient, but the small a part below the decimal point of the product value &'X% does not represent the remainder up to this t. , the product of this value and the divisor is the remainder. The second reason why this calculation is an approximation is that an error occurs when calculating the remainder.
I'll go. Conventionally, due to one or more of two reasons, only approximate calculations were performed and it was not possible to obtain an accurate remainder.
本発明の目的に、浮動小数点データの除算において、演
算結果としての商および剰余を、非常にn度良く得るこ
とができる情報処理装置を提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide an information processing device that can obtain a quotient and a remainder as a result of a calculation very well in the division of floating point data.
#!1および第2のレジスタと、除数の指数部およ・び
仮数部をそれぞれ保持する第3および第4のレジスタと
、第1および第3のレジスタの指数部の差を求める第1
の演算手段と、第2および第4のレジスタの符号が同一
かどうかを判定する比較手段と、この比較手段の比較結
果に応じて、第2および第4のレジスタの内容の加算ま
たは減算を行なう第2の演算手段と、第1の演算手段で
の演算結果に応じ九回数だけ、第2の演算手段での演算
を繰り返し、その中間過程で除数の仮数部を第2の演算
手段での演算結果で更新し、かつ、除数゛の仮数部の値
を桁移動させるようにする制御手段とを備えたことに特
徴がある。#! 1 and 2nd registers, 3rd and 4th registers that hold the exponent part and mantissa part of the divisor, respectively;
a computation means, a comparison means for determining whether the signs of the second and fourth registers are the same, and addition or subtraction of the contents of the second and fourth registers according to the comparison result of the comparison means. The calculation by the second calculation means is repeated nine times according to the calculation result by the first calculation means, and in the intermediate process, the mantissa part of the divisor is calculated by the second calculation means. The present invention is characterized in that it includes a control means that updates the result and moves the value of the mantissa part of the divisor by digits.
以下、本発明の実施例を図面により詳細に説明する。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
ys1図は本発明による情報処理装置の主要部の一実施
例の構成を示すものである。FIG. ys1 shows the configuration of an embodiment of the main part of the information processing device according to the present invention.
第1図において、レジスタ1,2は被除at保持するレ
ジスタで、指数部レジスタ1と仮数部レジスタ2よりな
る。レジスタ3.4は除数を保持するレジスタで、指数
部レジスタ3と仮数部レジスタ4よシなる。レジスタ5
.6は演算結果の剰余全保持するレジスタで、指数部レ
ジスタ5と仮数部レジスタ6よシなる。これら3個のレ
ジスタに保持されるデータは、正規化された浮動小数点
表現によるものとする。もしデータが正規化されていな
い場合には、以下に述べる処理に先立って、正規化処理
を行なうことは従来通シである。また除数の値が0であ
るときは、従来通シ除算の例外として扱う。除数の値が
0でなく被除数の値が00ときは、剰余および商を0と
する。以下の説明は除数、被除数ともに0でない場合に
ついて行なう。In FIG. 1, registers 1 and 2 are registers that hold the dividend at, and consist of an exponent register 1 and a mantissa register 2. Register 3.4 is a register that holds the divisor, and consists of exponent register 3 and mantissa register 4. register 5
.. Reference numeral 6 denotes a register for holding the entire remainder of the operation result, which is comprised of the exponent part register 5 and the mantissa part register 6. It is assumed that the data held in these three registers is in normalized floating point representation. If the data has not been normalized, it is conventional to perform normalization processing prior to the processing described below. Furthermore, when the value of the divisor is 0, it is treated as an exception to conventional division. When the value of the divisor is not 0 and the value of the dividend is 00, the remainder and quotient are set to 0. The following explanation will be given for the case where both the divisor and the dividend are not 0.
指数部と仮数部の表現形式は種々存在するが、ここでは
説明の便宜上次の通りとする。これ以外の表現形式をと
る場合でも本質的な差異はなく適用可能であることはい
うまでもない。すなわち、指数部は整数で狭わし、その
負数は2の補数で表わす。仮数部は値Xに関する次の不
等式を満たす数値の2進ビット列で表わし、その負数は
2の補数で表わす。Although there are various expression formats for the exponent part and the mantissa part, the following will be used here for convenience of explanation. It goes without saying that there is no essential difference and the invention is applicable even if other forms of expression are used. That is, the exponent part is narrowed to an integer, and its negative number is expressed as a two's complement number. The mantissa part is represented by a binary bit string of a numerical value that satisfies the following inequality regarding the value X, and its negative number is represented by a two's complement number.
一2≦x〈−1めるいは 1≦x (2レジスタ9は除
算の途中における中間剰余を保持するレジスタでおり、
その最左の1ビツト10は剰余の符号を表わす。符号1
0が値Oのとき非負であり、値1のとき負であることは
通例による。-2≦x〈-1 times 1≦x (2 register 9 is a register that holds intermediate remainder during division,
The leftmost bit 10 represents the sign of the remainder. code 1
It is customary that when 0 is the value O, it is non-negative, and when the value 1 is negative, it is negative.
レジスタ9には最初に、被除数の仮数の値を格納し、こ
れが最初の中間剰余となる。レジスタ11は除数の仮数
の値を格納するためのレジスタであり、除算の間その値
を変えない。なお、レジスタ9はレジスタ2で、レジス
タ11はレジスタ4で兼ねることもできる。Register 9 first stores the value of the mantissa of the dividend, which becomes the first intermediate remainder. Register 11 is a register for storing the value of the mantissa of the divisor, and its value does not change during division. Note that the register 9 can also be used as the register 2, and the register 11 can also be used as the register 4.
レジスタ7は被除数の指数部レジスタ1の値と除数の指
数部レジスタ3の直の差を保持するレジスタであり、こ
れは除算の主要部を占める繰返しの回数を定めるために
用いられる。レジスタ8はシフトレジスタでメジ、符号
比較器15の結果によって値が設定されるが、設定方法
は除算の3ステツプ(句前処理、(b)繰返し、(C)
後処理によって異なる。演算器14は、加減算を行なう
もので、そこで加算を行なうか、減算を行1なうかは比
較器15の結果によって定まる。この演算器14は。Register 7 is a register that holds the direct difference between the value of dividend exponent register 1 and the value of divisor exponent register 3, and is used to determine the number of repetitions that constitute the main part of division. Register 8 is a shift register, and the value is set according to the result of sign comparator 15, but the setting method is 3 steps of division (phrase preprocessing, (b) repetition, (C)
Depends on post-processing. The arithmetic unit 14 performs addition and subtraction, and the result of the comparator 15 determines whether addition or subtraction is performed. This arithmetic unit 14 is.
比較器15の結果が0のとき、すなわち中間剰余の符号
と除数の符号が一致しないとき加算器として、陶じく1
のどき、すなわち両符号が一致するとき減算器として働
らく。演算器13は常に減算器として働らき、レジスタ
ーからの入力13aの値η為ら、レジスタ3からの入力
13bの値を減じた結果を出力レジスタ7に保持する。When the result of the comparator 15 is 0, that is, the sign of the intermediate remainder and the sign of the divisor do not match, the adder
It works as a subtractor when both codes match. The arithmetic unit 13 always works as a subtracter, and holds the result of subtracting the value of the input 13b from the register 3 from the value η of the input 13a from the register in the output register 7.
なお、この演算器13は演算器14で兼ねてもよい。Note that the arithmetic unit 14 may also serve as the arithmetic unit 13.
比較器15tl、 レジスタ9の符号ビット1oと、レ
ジスター1の符号ビット12の値によって結果が疋マリ
、その結果は、第2図に示す通り、両人力が等しいとき
11等しくないとき0となる。The result is determined by the values of the sign bit 1o of the register 9 and the sign bit 12 of the register 1 in the comparator 15tl.As shown in FIG. 2, the result is 11 when the two forces are equal and 0 when they are not equal.
タ
シフ$16はレジスタ9の値を演算器14の第1人力1
4mに1ビツト左シフトしたものを転送する几めのもの
である。1ビツト左シフトする母線20の他に、シフト
しない母線21を設ける。Tashif $16 converts the value of register 9 into the first human power 1 of arithmetic unit 14.
This is a sophisticated method that transfers the data shifted by 1 bit to the left in 4m. In addition to the bus bar 20 that is shifted to the left by one bit, a bus bar 21 that is not shifted is provided.
#I3図は、第1図の装置によって除算を行なう制御子
Jldの一例を示すもので、これらの制御は、図示され
ていないプロセッサによって行なわれる。#I3 shows an example of a controller Jld that performs division by the device shown in FIG. 1, and these controls are performed by a processor not shown.
除算は(a)前処理、 (b)繰返し処理、(C)後処
理の3つの処理からなっており、これらを順次、第3図
を参照しながら説明する。Division consists of three processes: (a) preprocessing, (b) iterative processing, and (C) postprocessing, and these will be explained in sequence with reference to FIG.
まず、被除数の仮数部レジスタ2の値をレジスタ9に除
数の仮数部レジスタ4の値をレジスタ11に転送する(
第3図のステップ31.32)レジスタ9の値を演勇器
14の第1人力14aとして、母線21を通して転送す
る。また、レジスタ11の値を演算器14の第2人力1
4bとして転送する。演算器14の減算の結果をレジス
タ9に転送する。一方、レジスタ9の符号ピッ)10と
レジスタ11の符号ビット12を比較器15に送り比較
を行ない、両ビットが同じであればlを出力し、同じで
なければ01出力する。比較器15の比較結果の値が、
0のときシフトレジスタ8をすべて1に、1のときすべ
て0に設定する(第3図のステップ33)。これは、「
足し戻しをしない除算」として知られた演算のための初
期条件の設定である。通常この演算は、次項の繰返し処
理と同じ操作を行なって、最後に符号ビットの0と1の
反転によって実現するが、本発明の場合には、一般の手
法と異なり、次項の繰返し処理の回数が、仮数部の有効
ビット数とは異なるため。First, the value of the mantissa register 2 of the dividend is transferred to register 9, and the value of the mantissa register 4 of the divisor is transferred to register 11 (
Steps 31 and 32 in FIG. 3) Transfer the value of the register 9 through the bus 21 as the first human power 14a of the reenactor 14. Also, the value of the register 11 is input to the second manual input 1 of the arithmetic unit 14.
Transfer as 4b. The result of subtraction by the arithmetic unit 14 is transferred to the register 9. On the other hand, the sign bit 10 of register 9 and the sign bit 12 of register 11 are sent to comparator 15 for comparison, and if both bits are the same, 1 is output, and if not, 01 is output. The value of the comparison result of the comparator 15 is
When the value is 0, all the shift registers 8 are set to 1, and when the value is 1, all the values are set to 0 (step 33 in FIG. 3). this is,"
This is the setting of the initial conditions for an operation known as "division without addition." Normally, this operation is realized by performing the same operation as the iterative process in the next section and finally inverting the sign bit between 0 and 1. However, in the case of the present invention, unlike the general method, the number of iterative processes in the next section is is different from the effective number of bits in the mantissa.
最後の符号ビットの0と1の反転のみでは実現できない
からである。This is because it cannot be realized only by inverting the last sign bit between 0 and 1.
指数部レジスターの値を演算器i3の第1人力13aと
して入れるとともに、指数部レジスタ3の値を演算器1
3の第2人力13bとして入れる。The value of the exponent part register is entered as the first manual input 13a of the arithmetic unit i3, and the value of the exponent part register 3 is input to the arithmetic unit 1.
Insert it as the second human power 13b of 3.
演算器13は、第1人力13aの値〃為ら第2人力13
bの値を減じ、その結果の値nをレジスタ7に保持する
(第3図のステップ34)
(b) 繰返し処理
次のことを、レジスタ7の値nに1を加えた回数だけ行
なう。The calculator 13 calculates the value of the second human power 13 from the value of the first human power 13a.
The value of b is subtracted and the resulting value n is held in the register 7 (step 34 in FIG. 3). (b) Iterative processing The following is performed as many times as the value n in the register 7 plus 1.
すなわち、レジスタ7の値nを調べ(第3図のステップ
35)、それが負でなければ、レジスタ7の値’klだ
け減少する(第3図のステップ36)とともに、比較器
15で、レジスタ9と11の符号を比較する(第3図の
ステップ37)。That is, the value n of register 7 is checked (step 35 in FIG. 3), and if it is not negative, it is decreased by the value 'kl of register 7 (step 36 in FIG. 3), and the comparator 15 The codes of 9 and 11 are compared (step 37 in FIG. 3).
ダ
レジスタ9の値を、シフ416を通して、母線20によ
って、演算器14の第1人力14aそしテ転送スる。レ
ジスター1の値を演算器14の第2人力14bとして転
送する。比較器15の結果によって演算器14ffi加
算器あるいは減算器として働かせ、出力結果をレジスタ
9に転送する(第3図のステップ39.41)。The value of the register 9 is transferred to the first input 14a of the arithmetic unit 14 via the shifter 416 and the bus 20. The value of register 1 is transferred as second manual input 14b of computing unit 14. Depending on the result of the comparator 15, the arithmetic unit 14ffi is operated as an adder or a subtracter, and the output result is transferred to the register 9 (steps 39 and 41 in FIG. 3).
また、シフトレジスタ8の内容を1ビツト左にシフトし
、最も右のビットとし、比較器15の結果の値を設定す
る(第3図のステップ38.40)。Also, the contents of the shift register 8 are shifted to the left by one bit, making it the rightmost bit, and the value of the result of the comparator 15 is set (step 38.40 in FIG. 3).
この部分の処理は、「足し戻しをしない除算」として知
られた演算である。剰余と除数が同符号のときは商1を
立てて減算し、異符号のときは商−1を立てて加算する
。この演算によれば常に最新の商のビットは1であるが
、その直前の商は、商lが立つときは1のまま、商−1
が立つときは引算の借りにより0となる。したがって、
直前の商として、同符号のとき1.異符号のとき0奮立
てるわけである。This part of the processing is an operation known as "division without adding back." When the remainder and the divisor have the same sign, the quotient 1 is set and subtracted; when the remainder and the divisor are different signs, the quotient -1 is set and added. According to this operation, the bit of the latest quotient is always 1, but the previous quotient remains 1 when the quotient l stands, and the bit of the quotient - 1
When it stands, it becomes 0 due to the debt of subtraction. therefore,
As the previous quotient, if the signs are the same, 1. When the signs are different, 0 is excited.
以上のことから、この繰返しを終ったとき、最後の商は
lであることを考慮しなければならない。From the above, we must consider that when we finish this iteration, the final quotient is l.
繰返しの回数を、レジスタ7の値に1を加え友ものとす
る理由は、商として0.5あるいは−0,5まで求める
ためである。これによって、剰余rの範囲が、除数dに
よって次の範囲となる。The reason why the number of repetitions is determined by adding 1 to the value of register 7 is to obtain the quotient up to 0.5 or -0.5. As a result, the range of the remainder r becomes the next range depending on the divisor d.
−I d l/2<r< l d l/2刺余rの範囲
をこの通りとすることによって1次の後処理を容易にす
ることができる。-Idl/2<r<ldl/2 By setting the range of the sting margin r as described above, the primary post-processing can be facilitated.
(C) 後処理
レジスタ9の値を、母線21全通って演算器14の第1
人力14Mとして転送する。その第2人力についてはこ
れまでと同じである。演算器14において、比較器15
の比較結果によって加算あるいは減算全行なって、演算
結果をレジスタ6に転送する(第5図のステップ43)
。レジスタ3の値からまたけ減じた値全レジスタ5に転
送する。(C) The value of the post-processing register 9 is passed through the entire bus line 21 to the first
Transfer as 14M manpower. The second manpower remains the same as before. In the arithmetic unit 14, a comparator 15
Performs all additions or subtractions depending on the comparison result, and transfers the operation result to register 6 (step 43 in Figure 5).
. The value subtracted from the value in register 3 is transferred to all registers 5.
シフトレジスタ8については、比較器15の値がOのと
きはそのまま、1のときは、1を加える(第3図のステ
ップ42)。Regarding the shift register 8, when the value of the comparator 15 is O, it is left as is, and when it is 1, it is incremented by 1 (step 42 in FIG. 3).
この処理は、(切繰返しの最後の商が0.5あるいは−
0,5であるものを整数に補正するためのものである。This process is performed as follows: (the last quotient of the cut repetition is 0.5 or -
This is for correcting 0 and 5 to integers.
小数点形式で、レジスタ5,6に剰余が浮動小数点形式
が得られる。固定小数点形式力・ら浮動小数点形式への
変形、浮動小数点数の正規化については、必要に応じて
これを行なってもよい。In decimal point format, the remainder in registers 5 and 6 is obtained in floating point format. Transformation from fixed-point format to floating-point format and normalization of floating-point numbers may be performed as necessary.
不発明によれば、浮動小数点形式で表現された数値の除
算の商を整数値として得るように繰返し回!I2を制御
し、整数の商とそのときの剰余とを得るための手段金与
えることによって、正しく剰余を得ることができるため
1例えば1次に述べる周期関数値等の計算を種度よく行
なえる。According to the invention, iterative times to obtain the quotient of division of numbers expressed in floating point format as an integer value! By controlling I2 and providing the means to obtain the quotient of an integer and the remainder at that time, it is possible to obtain the remainder correctly.1 For example, calculations such as periodic function values described below can be performed with great accuracy. .
浮動小数点数の除算において、商と剰余を同時に求め得
ることによる効果を示す例を述べる。Let's look at an example that shows the effect of being able to calculate the quotient and remainder at the same time in division of floating-point numbers.
三角関数は周期関数である。このうち正接関数の周期は
弧度法で表わすときπ(円周率)である。Trigonometric functions are periodic functions. Among these, the period of the tangent function is π (pi) when expressed by the arc degree method.
しかし次の関係式も知られている。However, the following relational expression is also known.
tan((2i+1 ) K/ 2+r )=−1/1
anrこれを用いて、正接関数値の値を
一π/4<r<π/4
におけるtan rの値の計算に基づいて計算するとと
ができるから、実質的に周期はに/2であると考えて差
しつかえない。また従来多くの正接関数計算用サブルー
チンはこのように作られてきている。tan((2i+1)K/2+r)=-1/1
anrUsing this, the value of the tangent function can be calculated based on the calculation of the value of tan r when π/4<r<π/4, so the period is essentially 2/2. I can't help but think about it. Furthermore, many subroutines for calculating tangent functions have conventionally been created in this manner.
以上のことから、正接関数値の計算においては独立変数
Xをに/2で除した商qと剰余rとを求めることによっ
て、次の2ステツプで計算できる。From the above, the tangent function value can be calculated in the following two steps by dividing the independent variable X by /2 and finding the quotient q and the remainder r.
(a) 区間
−に/4<r<π/4
における正接関数値計算ルーチンによシtaorの値を
求める。(a) Find the value of taor using the tangent function value calculation routine in the interval -/4<r<π/4.
(b) Qの偶奇により、qが偶数のときにそのまま
奇数のときは一1/1anri計算する。(b) Depending on whether Q is even or odd, when q is an even number, when it is an odd number, 1/1 anri is calculated.
ここでqは整数、rは次の区間を満たすように定める。Here, q is an integer, and r is determined to satisfy the following interval.
K / 4 (r (に/4
このように、単に剰余のみでなく、商も同時に求められ
ると効果的でおる場合が存在し、三角関数の計算は多く
の場合そうである。K/4 (r (ni/4) In this way, there are cases where it is effective to calculate not only the remainder but also the quotient at the same time, and this is often the case when calculating trigonometric functions.
剰余として得られる結果の値の範囲は、理論的には一通
りに決まるわけでにないが、実用的にはそれらのうちの
一つとして、絶対値が最も小となるものを選ぶのがよい
。その理由は、浮動小数点表現が、数値の有効桁数を可
能なかぎり保持する目的で使われるものであるから、絶
対値の小なる数値はど、絶対値としてのきめ細かさが保
存されるからである。したがって、剰余の値rとしてと
り得る範囲は、除数の絶対値((dとするとき。Theoretically, the range of values that can be obtained as a remainder cannot be determined exactly, but in practice it is best to choose one of them that has the smallest absolute value. . The reason for this is that floating point representation is used to preserve the number of significant digits of a number as much as possible, so for numbers with small absolute values, the fineness of the absolute value is preserved. be. Therefore, the possible range of the remainder value r is the absolute value of the divisor ((when d).
−d/2<r<d/2
とする。符号については、上のものに限ることはなく、
右の不等号に付けてもよいし、除数、被除数の符号によ
って定まるようにして奄、実用的に何ら差し支えない。−d/2<r<d/2. The symbols are not limited to those above,
It may be attached to the inequality sign on the right, or it may be determined by the signs of the divisor and dividend, and there is no practical problem.
除数dによる除算の代りに1/dとの積を計算し、歪数
部と小数部に分離するようにした従来の装置(例えは、
米国特許第3.871,578号)に比べて、本発明は
次のような効果がある。Conventional devices (for example,
Compared to U.S. Pat. No. 3,871,578), the present invention has the following effects.
(1)従来のものでは、浮動小数点除算での商は計91
−大丁し1
算できるが剰余は直接できYい希で未発明では。(1) In the conventional method, the quotient in floating-point division is 91 in total.
- It can be calculated, but the remainder cannot be directly calculated, and it is rare and has not yet been invented.
商とともに、剰余を直接計算できる。Along with the quotient, the remainder can be calculated directly.
(2) 従来のもので1求めた小数部に除数dを乗ず
れば剰余を求めることができるが、正しい値でないのに
対して、本発明は正しい剰余が得られる。(2) In the conventional method, a remainder can be obtained by multiplying the decimal part obtained by 1 by a divisor d, but this is not a correct value, whereas the present invention can obtain a correct remainder.
(3)従来の場合、浮動小数点数の乗法の演算の結果、
乗数と同じ有効桁数だけ得られるが、小数点以上の整数
部の有効桁数の分だけ小数部の有効桁数が減少する几め
、剰余計算の代替演算とはなり得ないのに対して、本発
明ではそのような不都合はない。(3) In the conventional case, the result of multiplication of floating point numbers is
Although it obtains the same number of significant digits as the multiplier, the number of significant digits in the decimal part decreases by the number of significant digits in the integer part above the decimal point, so it cannot be used as an alternative to the remainder calculation. The present invention does not have such disadvantages.
(4)従来のものでは、三角関数等の近似公式は独立変
数の簡単な関数になっているが、乗法による小数部を用
いる時は独立変数に一?′に変換を施した公式を用いな
ければならないので、公式の係数の誤差が生ずるととも
に、小数部を得るために、dを乗じ定時に誤差が生じ、
それらの誤差が複合して大きな誤差となるのに対して、
本発明はそのような誤差は全く生じない。(4) In conventional methods, approximation formulas such as trigonometric functions are simple functions of the independent variable, but when using the decimal part by multiplication, the independent variable is a single function. Since we have to use a formula that has been converted to
While these errors combine to create a large error,
In the present invention, such errors do not occur at all.
第1図に本発明による情報処理装置の主要部の一実施例
の構成図、第2図は第1図の比較器でのの一例を示すフ
ローチャートである。
1〜12・・・レジスタ、13.14・・・演算器、1
5Yi+ 図
劣 3 図FIG. 1 is a block diagram of an embodiment of the main parts of an information processing apparatus according to the present invention, and FIG. 2 is a flowchart showing an example of the comparator of FIG. 1. 1 to 12...Register, 13.14...Arithmetic unit, 1
5Yi+ Inferior 3 figure
Claims (1)
1および第2のレジスタと、除数の指数部および仮数部
をそれぞれ保持する第3および第4のレジスタと、上記
第1および第3のレジスタの指数部の差を求める第1の
演算手段と、上記第2および第4のレジスタの符号が同
一かどうかを判定する比較手段と、該比較手段の比較結
果に応じて、上記第2および#!4のレジスタの内容の
加算または減算を行なう第2の演算手段と、上記第1の
演算手段での演算結果に応じた回数だけ、上記第2の演
算手段での演算を繰り返し、その中間過程で除数の仮数
部を上記第2の演算手段での演算結果で更新し、かつ、
除数の仮数部の値を桁移動させるようにする制御手段と
を備え友ことを特徴とする情報処理装置。1, first and second registers that hold the dividend to exponent part and mantissa part, respectively; third and fourth registers that hold the exponent part and mantissa part of the divisor, respectively; a first calculation means for calculating the difference between the exponent parts of the registers; a comparison means for determining whether the signs of the second and fourth registers are the same; #! A second arithmetic means for adding or subtracting the contents of the register No. 4 repeats the arithmetic operation by the second arithmetic means a number of times according to the arithmetic result of the first arithmetic means, and in the intermediate process. updating the mantissa part of the divisor with the calculation result of the second calculation means, and
An information processing apparatus comprising: a control means for shifting the value of the mantissa part of the divisor by digits.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57038016A JPS58155456A (en) | 1982-03-12 | 1982-03-12 | information processing equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57038016A JPS58155456A (en) | 1982-03-12 | 1982-03-12 | information processing equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58155456A true JPS58155456A (en) | 1983-09-16 |
| JPH0368414B2 JPH0368414B2 (en) | 1991-10-28 |
Family
ID=12513773
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57038016A Granted JPS58155456A (en) | 1982-03-12 | 1982-03-12 | information processing equipment |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58155456A (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS4846237A (en) * | 1971-10-13 | 1973-07-02 | ||
| JPS5010933A (en) * | 1973-05-28 | 1975-02-04 |
-
1982
- 1982-03-12 JP JP57038016A patent/JPS58155456A/en active Granted
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS4846237A (en) * | 1971-10-13 | 1973-07-02 | ||
| JPS5010933A (en) * | 1973-05-28 | 1975-02-04 |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0368414B2 (en) | 1991-10-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0149248A2 (en) | Method and apparatus for division using interpolation approximation | |
| US10489153B2 (en) | Stochastic rounding floating-point add instruction using entropy from a register | |
| JP3418460B2 (en) | Double precision division circuit and method | |
| JP3845009B2 (en) | Product-sum operation apparatus and product-sum operation method | |
| CN111124361A (en) | Arithmetic processing apparatus and control method thereof | |
| US4594680A (en) | Apparatus for performing quadratic convergence division in a large data processing system | |
| US5260889A (en) | Computation of sticky-bit in parallel with partial products in a floating point multiplier unit | |
| JPH05250146A (en) | Arithmetic operation circuit executing integer involution processing | |
| US5278782A (en) | Square root operation device | |
| EP0366155A2 (en) | Logarithmic function arithmetic unit including means for separately processing pseudo division and multiplication | |
| US6598065B1 (en) | Method for achieving correctly rounded quotients in algorithms based on fused multiply-accumulate without requiring the intermediate calculation of a correctly rounded reciprocal | |
| EP0377992A2 (en) | Floating point division method and apparatus | |
| US5377134A (en) | Leading constant eliminator for extended precision in pipelined division | |
| Ashenhurst | The Maniac III arithmetic system | |
| JPS58155456A (en) | information processing equipment | |
| JPS6120134A (en) | Root calculator | |
| JPH0831024B2 (en) | Arithmetic processor | |
| JPH0772860B2 (en) | Calculation method | |
| US20250208831A1 (en) | Method and system for decimal floating-point computation | |
| JPH0325809B2 (en) | ||
| KR100974190B1 (en) | Complex multiplication method using floating point | |
| JP2761145B2 (en) | Square root arithmetic unit | |
| JP4428778B2 (en) | Arithmetic device, arithmetic method, and computing device | |
| JP3522387B2 (en) | Pipeline arithmetic unit | |
| JP3100868B2 (en) | Arithmetic unit for floating point numbers |