JP2752948B2 - Floating point arithmetic unit - Google Patents
Floating point arithmetic unitInfo
- Publication number
- JP2752948B2 JP2752948B2 JP8039598A JP3959896A JP2752948B2 JP 2752948 B2 JP2752948 B2 JP 2752948B2 JP 8039598 A JP8039598 A JP 8039598A JP 3959896 A JP3959896 A JP 3959896A JP 2752948 B2 JP2752948 B2 JP 2752948B2
- Authority
- JP
- Japan
- Prior art keywords
- floating
- point
- data
- arithmetic
- bcd
- 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.)
- Expired - Lifetime
Links
- 238000006243 chemical reaction Methods 0.000 claims description 11
- 238000010195 expression analysis Methods 0.000 claims description 3
- 238000000034 method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000009469 supplementation Effects 0.000 description 1
- 238000004148 unit process Methods 0.000 description 1
Description
【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION
【0001】[0001]
【発明の属する技術分野】本発明は、浮動小数点演算装
置に関し、特に、桁落ち誤差やそれに伴う伝搬誤差のな
い正確な結果を得ることができる浮動小数点演算装置に
関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a floating-point arithmetic device, and more particularly, to a floating-point arithmetic device capable of obtaining an accurate result without a cancellation error and a propagation error associated therewith.
【0002】[0002]
【従来の技術】近年、情報処理の分野において、多量の
データを扱うようになってきている。その際、より高速
に、より高精度に処理を行うことが重要な課題になって
きている。2. Description of the Related Art In recent years, a large amount of data has been handled in the field of information processing. At that time, it has become an important issue to perform processing at higher speed and with higher accuracy.
【0003】たとえば、小数点データを含む演算処理を
行う場合、一般的に固定小数点演算と浮動小数点演算が
挙げられるが、固定小数点演算は高速だが精度は劣り、
浮動小数点演算は高精度だが、性能は劣るというように
一長一短の性格を保有している。For example, when performing arithmetic processing including decimal point data, there are generally fixed point arithmetic and floating point arithmetic. Fixed point arithmetic is high speed but inferior in accuracy.
Floating-point arithmetic has high and low characteristics, such as high precision but poor performance.
【0004】処理性能を保ちつつ精度を上げる方法とし
て「実開昭64−18344号公報」記載の方法のよう
に、演算後の誤差を比較して演算ユニットを切り分ける
技術が提案されている。As a method of improving accuracy while maintaining processing performance, there has been proposed a technique of comparing the errors after calculation and separating the calculation units, as in the method described in Japanese Utility Model Laid-Open No. 64-18344.
【0005】しかしながら上記技術では、一定値以下の
誤差は発生するため、以下に説明するような桁落ち発生
時の微細な誤差が混入する恐れがある。However, in the above technique, since an error smaller than a certain value occurs, there is a possibility that a minute error at the time of occurrence of a digit loss as described below is mixed.
【0006】浮動小数点演算装置は数値データを浮動小
数点形式で処理している。浮動小数点形式では数値を仮
数部と指数部にわけて保持しており、その関係は浮動小
数点数をNとすると以下の式で表される。[0006] A floating point arithmetic unit processes numerical data in a floating point format. In the floating-point format, a numerical value is held in a mantissa part and an exponent part, and the relationship is expressed by the following equation, where N is the floating-point number.
【0007】N=1.M*BexponentE M:仮数部 B:基数 E:指数部 浮動小数点演算を行う上で一番影響が大きいのが、近い
数値同士の加減算を行う際に発生する桁落ち誤差であ
る。この場合、有効桁が失われるだけでなく、正規化を
行う際に仮数部の下位桁に微細な誤差が入り込む恐れが
ある。N = 1. M * BexponentE M: mantissa part B: radix E: exponent part The most significant effect in performing a floating-point operation is a digit cancellation error that occurs when performing addition and subtraction between similar numerical values. In this case, not only the significant digits are lost, but also a small error may enter the lower digits of the mantissa during normalization.
【0008】以下、“1.001−1”の演算を例にと
って説明する。Hereinafter, the calculation of "1.001-1" will be described as an example.
【0009】基数Bが“2”、指数部Eが11ビット、
指数部のバイアスが“1023”(16進数で表すと、
“3FF”)、仮数部Mが52ビットとする。The radix B is "2", the exponent part E is 11 bits,
When the bias of the exponent is “1023” (expressed in hexadecimal,
"3FF"), and the mantissa M is 52 bits.
【0010】以下指数部、仮数部は16進数で表現す
る。Hereinafter, the exponent part and the mantissa part are represented by hexadecimal numbers.
【0011】“1.001”は、指数部が“3FF”、
仮数部が“004189374BC6A”である。"1.001" means that the exponent part is "3FF",
The mantissa is “0041189374BC6A”.
【0012】“1”は、指数部が“3FF”、仮数部が
“0000000000000”である。For "1", the exponent part is "3FF" and the mantissa part is "0000000000000".
【0013】減算“1.001−1”の浮動小数点演算
を実施すると、“0.004189374BC6A”と
なる。When the floating-point operation of the subtraction "1.001-1" is performed, the result becomes "0.004189374BC6A".
【0014】これに丸め(“0”の補充)を実施し、正
規化(この場合左10ビットシフト)すると、N1=
“1.0624DD2F1A800”となる。When this is rounded (supplementation of “0”) and normalized (in this case, shifted left by 10 bits), N1 =
"1.0624DD2F1A800".
【0015】この結果、指数部が“3F5”、仮数部が
“0624DD2F1A800”となる。As a result, the exponent is "3F5" and the mantissa is "0624DD2F1A800".
【0016】一方、実際の“1.001−1=0.00
1”を左10ビットシフトした結果は、N2=“1.0
624DD2F1A9FC”である。On the other hand, the actual "1.001-1 = 0.00
The result of shifting 1 ”to the left by 10 bits is N2 =“ 1.0
624DD2F1A9FC ".
【0017】したがって、正しい仮数部は、“1.06
24DD2F1A9FC”である。Therefore, the correct mantissa is "1.06
24DD2F1A9FC ".
【0018】以上のように、浮動小数点演算により、N
2−N1=“0.00000000001FC”の誤差
が生じる。As described above, by the floating-point operation, N
2-N1 = an error of "0.0000000001FC" occurs.
【0019】[0019]
【発明が解決しようとする課題】上述した従来の技術で
は、桁落ち誤差発生による演算結果不正は考慮されてい
ない。In the above-mentioned prior art, the erroneous calculation result due to the occurrence of the cancellation error is not considered.
【0020】この問題は数値データを浮動小数点形式で
なく2進化10進(以下、BCDと記す)形式(小数点
を固定として扱う)で有し、BCD演算を行うことによ
り回避できるが、BCD演算は浮動小数点演算に比べて
時間がかかるという欠点がある。This problem can be avoided by having the numerical data not in the floating point format but in a binary-coded decimal (hereinafter, referred to as BCD) format (the decimal point is treated as fixed), and the BCD operation can be avoided. There is a disadvantage that it takes more time than floating point arithmetic.
【0021】本発明の目的は、桁落ちの可能性がある演
算種別に対してのみBCD演算を実施することにより、
処理速度を大幅に低下させることなく、正確な演算結果
を得る浮動小数点演算装置を提供することにある。[0021] An object of the present invention is to perform a BCD operation only on an operation type that may cause a digit loss,
It is an object of the present invention to provide a floating-point operation device that can obtain an accurate operation result without significantly lowering the processing speed.
【0022】[0022]
【課題を解決するための手段】本発明の第1の浮動小数
点演算装置は、(a)演算式を入力するための演算式入
力手段と、(b)前記演算式入力手段に入力された演算
式を解析して二項演算の組み合わせに分解し、演算種別
群と浮動小数点データ群とを出力する演算式解析手段
と、(c)前記演算種別群と前記浮動小数点データ群と
を入力し2進化10進(BCD)演算と浮動小数点演算
のどちらを行うかを判断する演算制御手段と、(d)前
記二項演算で桁落ちの可能性を判別する桁落ち判別手段
と、(e)前記浮動小数点データ群のうち、前記桁落ち
判別手段で桁落ちの可能性がある判別された浮動小数点
データ対を2進化10進(BCD)データ対に変換し、
かつ、この2進化10進数データ対に対する2進化10
進(BCD)演算の結果を浮動小数点形式の第1の部分
結果データに変換するデータ変換手段と、(f)前記デ
ータ変換手段からの前記2進化10進データ対に対して
2進化10進(BCD)演算を行う2進化10進(BC
D)演算手段と、(g)前記浮動小数点データ群のう
ち、前記桁落ち判別手段で桁落ちの可能性が無いと判別
された浮動小数点データ対に対して浮動小数点演算を行
い、第2の部分結果データを出力し、かつ前記第1の部
分結果データと前記第2の部分結果データとを演算し結
果データを算出する浮動小数点演算手段と、(h)前記
結果データを出力する結果出力手段と、を備える。According to a first aspect of the present invention, there is provided a floating-point arithmetic device comprising: (a) an arithmetic expression input means for inputting an arithmetic expression; and (b) an arithmetic expression input to the arithmetic expression input means. An arithmetic expression analyzing means for analyzing the expression and decomposing it into a combination of binary operations and outputting an operation type group and a floating-point data group; and (c) inputting the operation type group and the floating-point data group to An arithmetic control means for determining whether to perform an evolutionary decimal (BCD) operation or a floating-point operation; (d) an underflow determination means for determining the possibility of an underflow in the binary operation; Converting a floating point data pair of the floating point data group determined to have a possibility of a digit loss by the digit loss determining means into a binary coded decimal (BCD) data pair;
In addition, the binary code 10 for the binary code data pair
Data conversion means for converting a result of a binary (BCD) operation into first partial result data in a floating-point format; and (f) a binary coded decimal (B) code for the binary coded decimal data pair from the data conversion means. Binary Evolution Decimal (BC) that performs BCD) operation
D) calculating means, and (g) performing a floating-point operation on a floating-point data pair of the floating-point data group, the floating-point data of which is determined to be free from a possibility of loss of precision, Floating point arithmetic means for outputting partial result data and calculating the first partial result data and the second partial result data to calculate result data; and (h) result output means for outputting the result data. And.
【0023】本発明の第2の浮動小数点演算装置は、前
記第1の浮動小数点演算装置であって、前記演算種別群
のうち、減算に対して桁落ちの可能性があると判別する
前記桁落ち判別手段を備える。The second floating-point arithmetic unit according to the present invention is the first floating-point arithmetic unit, wherein the digit for judging that there is a possibility of loss of digits in subtraction among the arithmetic type groups. It is provided with an omission determining means.
【0024】[0024]
【発明の実施の形態】次に、本発明の浮動小数点演算装
置について図面を参照して詳細に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, a floating point arithmetic unit according to the present invention will be described in detail with reference to the drawings.
【0025】図1は本発明の浮動小数点演算装置のブロ
ック図である。FIG. 1 is a block diagram of a floating point arithmetic unit according to the present invention.
【0026】図2は図1の浮動小数点演算装置の処理の
流れ図である。FIG. 2 is a flowchart of the processing of the floating-point arithmetic unit of FIG.
【0027】図3は図1の浮動小数点演算装置で実施さ
れる演算例である。FIG. 3 shows an example of an operation performed by the floating-point operation device of FIG.
【0028】図1を参照すると、本発明の2進化10進
数(以下、BCDと記述する)演算を用いた浮動小数点
演算装置は、演算式を入力するための演算式入力手段1
と、入力した演算式を解析する演算式解析手段2と、解
析された演算式をもとに二項演算のデータを取り出す演
算制御手段3と、演算で桁落ちが生じるかどうかを判別
する桁落ち判別手段4と、二項演算を行う演算手段5
と、データ形式を変換するデータ変換手段6と、演算結
果を出力する結果出力手段7とから構成される。Referring to FIG. 1, a floating-point arithmetic device using a binary-coded decimal number (hereinafter, referred to as BCD) operation according to the present invention comprises an arithmetic expression input means 1 for inputting an arithmetic expression.
And an arithmetic expression analyzing means 2 for analyzing the input arithmetic expression, an arithmetic control means 3 for extracting data of a binary operation based on the analyzed arithmetic expression, and a digit for determining whether or not a digit loss occurs in the arithmetic operation. Omission determining means 4 and arithmetic means 5 for performing a binomial operation
And data conversion means 6 for converting the data format, and result output means 7 for outputting the operation result.
【0029】また演算手段5は浮動小数点演算手段51
と、BCD演算手段52とから構成される。The arithmetic means 5 is a floating point arithmetic means 51
And BCD operation means 52.
【0030】次に、図1の浮動小数点演算装置の動作に
ついて図2を参照して説明する。Next, the operation of the floating-point arithmetic unit of FIG. 1 will be described with reference to FIG.
【0031】演算式入力手段1から入力された(S20
1)演算式は演算式解析手段2で解析され(S20
2)、数値データと演算種別(加算,減算,乗算,除
算)からなる二項演算の組み合わせに分解される。Input from the arithmetic expression input means 1 (S20
1) The arithmetic expression is analyzed by the arithmetic expression analysis means 2 (S20)
2) It is decomposed into a combination of binary operations consisting of numerical data and operation types (addition, subtraction, multiplication, division).
【0032】ここで、数値データは浮動小数点形式であ
る。Here, the numerical data is in a floating point format.
【0033】次に、演算制御手段3は演算式解析手段2
から送られた演算式をもとに、二項演算の数値データと
演算種別とを入力し(S203)、桁落ち判別手段4に
送る。Next, the arithmetic control means 3 comprises the arithmetic expression analyzing means 2
Based on the arithmetic expression sent from, the numerical data of the binomial operation and the operation type are input (S203), and sent to the digit loss determination means 4.
【0034】桁落ち判別手段4ではこれから行う演算で
桁落ちが生じるかどうかを判別し(S204、S20
5)、その結果を演算制御手段3に返す。The digit loss determining means 4 determines whether or not a digit loss will occur in the calculation to be performed (S204, S20).
5), and return the result to the arithmetic and control unit 3.
【0035】演算制御手段3は演算手段5にデータを渡
し、演算手段5で演算を行う。演算手段5は桁落ちが生
じないときは、浮動小数点演算手段51で浮動小数点演
算を行い(S209)、桁落ちが生じるときはBCD演
算手段52でBCD演算を行う。浮動小数点演算の場
合、数値データは浮動小数点形式で保存されているので
そのまま演算を行う。BCD演算の場合、データ変換手
段6で二項演算の数値データを浮動小数点形式からBC
D形式に変換してから(S206)、BCD演算を行
い、その結果(BCD形式)を再びデータ変換手段6で
浮動小数点形式に戻す(S208)。The arithmetic control means 3 passes the data to the arithmetic means 5, and the arithmetic means 5 performs the arithmetic. The arithmetic unit 5 performs floating-point arithmetic with the floating-point arithmetic unit 51 when the digit loss does not occur (S209), and performs the BCD operation with the BCD arithmetic unit 52 when the digit loss occurs. In the case of the floating-point operation, since the numerical data is stored in a floating-point format, the operation is performed as it is. In the case of the BCD operation, the data conversion means 6 converts the binary data of the binary operation from the floating-point format to the BC
After the conversion into the D format (S206), the BCD operation is performed, and the result (BCD format) is returned to the floating point format again by the data conversion means 6 (S208).
【0036】こうして浮動小数点あるいはBCD演算で
得られた二項演算の結果を元の演算式に反映し(S21
0)、演算式解析手段から送られた演算式が終了するま
で繰り返し演算を行う。最後に演算式が終了した時点
で、その結果を結果出力手段7で出力する(S21
1)。The result of the binary operation obtained by the floating point or BCD operation is reflected in the original operation expression (S21).
0), The calculation is repeatedly performed until the calculation formula sent from the calculation formula analysis means is completed. Finally, when the operation expression ends, the result is output by the result output means 7 (S21).
1).
【0037】また、解析した演算式が加算,乗算,除算
の場合、桁落ちが発生する恐れはないので、二項演算は
浮動小数点演算で行われる(S209)。If the analyzed expression is addition, multiplication, or division, there is no risk of occurrence of a digit loss, so that the binary operation is performed by a floating-point operation (S209).
【0038】演算式が減算の場合は、まずこれから行う
演算で桁落ちが生じる可能性があるかどうか、二項演算
の数値データをもとに判断し(S205)、同程度の値
で桁落ちが生じるようであれば、BCD演算を行い(S
207)、桁落ちが生じないならば、浮動小数点演算を
行う(S209)。If the arithmetic expression is subtraction, it is first determined based on the numerical data of the binomial operation whether there is a possibility of a loss of value in the operation to be performed (S205). Occurs, a BCD operation is performed (S
207) If no dropout occurs, a floating-point operation is performed (S209).
【0039】BCD演算を行うときは、事前にデータを
浮動小数点形式からBCD形式に変換して(S206)
から行い、結果は浮動小数点形式からBCD形式に変換
する(S208)。When performing the BCD operation, the data is converted from the floating point format to the BCD format in advance (S206).
From the floating point format to the BCD format (S208).
【0040】演算式が加減乗除すべてを含む場合は、二
項演算に分解したあと、順番に演算していくが、二項演
算の種別および桁落ちの発生の有無により上記のよう
に、浮動小数点演算とBCD演算を使い分けて行う。If the arithmetic expression includes all addition, subtraction, multiplication, and division, it is decomposed into binary operations, and the operations are performed in order. The calculation and the BCD calculation are performed separately.
【0041】図3に実際の演算の例として、“(1.0
01−1)*1000”の演算を示す。まず演算式入力
手段1から入力された演算式“(1.001−1)*1
000”を、演算式解析手段2で解析し、数値データと
演算種別からなる二項演算の組み合わせに分解する。FIG. 3 shows "(1.0
01-1) * 1000 ". First, the arithmetic expression" (1.001-1) * 1 "input from the arithmetic expression input means 1 is shown.
000 "is analyzed by the arithmetic expression analyzing means 2 and decomposed into a combination of binary data consisting of numerical data and an operation type.
【0042】上記演算式の場合、 (1)数値データ “1.001”,“1”、演算種
別:減算 (2)数値データ ((1)の減算結果,“100
0”)、演算種別:乗算のように分解される。In the case of the above arithmetic expression, (1) numerical data "1.001", "1", operation type: subtraction (2) numerical data (subtraction result of (1), "100
0 "), operation type: decomposed like multiplication.
【0043】また、このとき演算対象となる数値データ
は浮動小数点形式で保存される。At this time, the numerical data to be operated is stored in a floating-point format.
【0044】次に演算式が終了するまで二項演算を演算
手段5で繰り返し行う。Next, the binary operation is repeatedly performed by the arithmetic means 5 until the arithmetic expression is completed.
【0045】上記の場合、初めに“1.001−1”の
二項演算を行うが、桁落ち判別手段4で、桁落ちが生ず
ると判断されるので、数値データ“1.001,1”を
データ変換手段6で浮動小数点形式からBCD形式に変
換し、BCD演算手段52でBCD演算を行う。In the above case, the binary operation of "1.001-1" is first performed. However, since the digit loss determination means 4 determines that a digit loss occurs, the numerical data "1.001,1" Is converted from the floating point format to the BCD format by the data conversion means 6, and the BCD calculation means 52 performs the BCD calculation.
【0046】得られた結果“0.001”を再びデータ
変換手段6でBCD形式から浮動小数点形式に変換した
のち、もとの演算式に反映する(→“0.001*10
00”)。The obtained result "0.001" is again converted from the BCD format to the floating point format by the data conversion means 6, and is reflected in the original arithmetic expression (→ "0.001 * 10").
00 ").
【0047】演算式はまだ終了していないので次に
“0.001*1000”の二項演算を行う。Since the arithmetic expression has not been completed yet, a binary operation of "0.001 * 1000" is performed next.
【0048】乗算の場合桁落ちは生じないので浮動小数
点演算手段51で浮動小数点演算が行われ、結果をもと
の演算式に反映する(→“1”)。ここで演算式は終了
するので、結果出力手段7で結果“1”が出力される。In the case of multiplication, no digit loss occurs, so that the floating-point arithmetic means 51 performs floating-point arithmetic and reflects the result in the original arithmetic expression (→ “1”). Here, the arithmetic expression ends, and the result output means 7 outputs the result “1”.
【0049】これらの演算をすべて浮動小数点演算で行
う場合、初めの減算で桁落ち誤差が生じ、正確に“0.
001”という値が得られず、次の乗算でその誤差が反
映され、不正な結果が得られる場合がある。In the case where all of these operations are performed by floating-point operations, the first subtraction causes a cancellation error, so that exactly "0.
001 "is not obtained, and the error is reflected in the next multiplication, and an incorrect result may be obtained.
【0050】本装置では、桁落ち誤差が発生しないの
で、正確に“1”という結果を得ることができる。In the present apparatus, since no cancellation error occurs, the result of "1" can be obtained accurately.
【0051】[0051]
【発明の効果】以上説明したように、本発明によるBC
D演算を用いた浮動小数点演算装置は、桁落ち判別手段
を設け、桁落ちが生じる可能性がある場合はBCD演算
を用いるようにしたため、桁落ち誤差のない正確な結果
を得ることができるという効果を有する。As described above, the BC according to the present invention is used.
Since the floating-point arithmetic device using the D operation is provided with a cancellation error determining means and uses the BCD operation when there is a possibility of an occurrence of an error, it is possible to obtain an accurate result without an error. Has an effect.
【0052】また、時間のかかるBCD演算は桁落ちが
生じる場合のみ行うようにしたため、処理速度の大幅な
低減を防ぐことができるという効果も有する。Further, since the time-consuming BCD operation is performed only when a digit loss occurs, there is an effect that a significant reduction in processing speed can be prevented.
【図1】本発明の浮動小数点演算装置のブロック図であ
る。FIG. 1 is a block diagram of a floating-point arithmetic device according to the present invention.
【図2】図1の浮動小数点演算装置の処理を示す流れ図
である。FIG. 2 is a flowchart showing a process of the floating-point arithmetic device of FIG. 1;
【図3】図1の浮動小数点演算装置による演算の例を示
す説明図である。FIG. 3 is an explanatory diagram illustrating an example of an operation performed by the floating-point operation device of FIG. 1;
1 演算式入力手段 2 演算式解析手段 3 演算制御手段 4 桁落ち判別手段 5 演算手段 6 データ変換手段 7 結果出力手段 51 浮動小数点演算手段 52 BCD演算手段 DESCRIPTION OF SYMBOLS 1 Arithmetic expression input means 2 Arithmetic expression analysis means 3 Arithmetic control means 4 Digit cancellation determination means 5 Arithmetic means 6 Data conversion means 7 Result output means 51 Floating point arithmetic means 52 BCD arithmetic means
Claims (2)
手段と、(b)前記演算式入力手段に入力された演算式
を解析して二項演算の組み合わせに分解し、演算種別群
と浮動小数点データ群とを出力する演算式解析手段と、
(c)前記演算種別群と前記浮動小数点データ群とを入
力し2進化10進(BCD)演算と浮動小数点演算のど
ちらを行うかを判断する演算制御手段と、(d)前記二
項演算で桁落ちの可能性を判別する桁落ち判別手段と、
(e)前記浮動小数点データ群のうち、前記桁落ち判別
手段で桁落ちの可能性がある判別された浮動小数点デー
タ対を2進化10進(BCD)データ対に変換し、か
つ、この2進化10進数データ対に対する2進化10進
(BCD)演算の結果を浮動小数点形式の第1の部分結
果データに変換するデータ変換手段と、(f)前記デー
タ変換手段からの前記2進化10進データ対に対して2
進化10進(BCD)演算を行う2進化10進(BC
D)演算手段と、(g)前記浮動小数点データ群のう
ち、前記桁落ち判別手段で桁落ちの可能性が無いと判別
された浮動小数点データ対に対して浮動小数点演算を行
い、第2の部分結果データを出力し、かつ前記第1の部
分結果データと前記第2の部分結果データとを演算し結
果データを算出する浮動小数点演算手段と、(h)前記
結果データを出力する結果出力手段と、を有することを
特徴とする浮動小数点演算装置。1. An arithmetic expression input means for inputting an arithmetic expression, and (b) an arithmetic expression inputted to the arithmetic expression input means is analyzed and decomposed into a combination of binomial operations. Arithmetic expression analysis means for outputting a group and a floating-point data group;
(C) an operation control means for inputting the operation type group and the floating-point data group to determine whether to perform a binary-coded decimal (BCD) operation or a floating-point operation; Digit loss determining means for determining the possibility of digit loss,
(E) converting the floating-point data pair of the floating-point data group determined to have a possibility of cancellation by the cancel-out determination means into a binary-coded decimal (BCD) data pair; Data conversion means for converting the result of a binary-coded decimal (BCD) operation on the decimal data pair into first partial result data in floating-point format; and (f) the binary-coded decimal data pair from the data conversion means. 2 for
Binary Evolution Decimal (BC) that performs Evolutionary Decimal (BCD) operation
D) calculating means, and (g) performing a floating-point operation on a floating-point data pair of the floating-point data group, the floating-point data of which is determined to be free from a possibility of loss of precision, Floating point arithmetic means for outputting partial result data and calculating the first partial result data and the second partial result data to calculate result data; and (h) result output means for outputting the result data. And a floating point arithmetic unit.
落ちの可能性があると判別する前記桁落ち判別手段を有
することを特徴とする請求項1記載の浮動小数点演算装
置。2. The floating-point arithmetic device according to claim 1, further comprising: the digit loss determining means for determining that there is a possibility of a digit loss in the subtraction of the arithmetic type group.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8039598A JP2752948B2 (en) | 1996-02-27 | 1996-02-27 | Floating point arithmetic unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8039598A JP2752948B2 (en) | 1996-02-27 | 1996-02-27 | Floating point arithmetic unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09231052A JPH09231052A (en) | 1997-09-05 |
| JP2752948B2 true JP2752948B2 (en) | 1998-05-18 |
Family
ID=12557559
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8039598A Expired - Lifetime JP2752948B2 (en) | 1996-02-27 | 1996-02-27 | Floating point arithmetic unit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2752948B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4997812B2 (en) * | 2006-03-31 | 2012-08-08 | カシオ計算機株式会社 | Calculation apparatus and calculation program |
-
1996
- 1996-02-27 JP JP8039598A patent/JP2752948B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH09231052A (en) | 1997-09-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6732134B1 (en) | Handler for floating-point denormalized numbers | |
| JP3178746B2 (en) | Format converter for floating point numbers | |
| CN116643718B (en) | Floating point fusion multiply-add device and method of pipeline structure and processor | |
| JP3313560B2 (en) | Floating point processor | |
| CN116594590A (en) | Multifunctional operation device and method for floating point data | |
| CN118819465B (en) | Floating-point data floating-point multiplication and addition operation method, device, electronic device and storage medium | |
| US7752250B2 (en) | Rounding floating point division results | |
| JP2752948B2 (en) | Floating point arithmetic unit | |
| CN112860218A (en) | Mixed precision arithmetic unit for FP16 floating point data and INT8 integer data operation | |
| CN117519638A (en) | A floating-point number operation circuit and method | |
| KR101922462B1 (en) | A data processing apparatus and method for performing a shift function on a binary number | |
| JP2006318382A (en) | Arithmetic device and type conversion device | |
| US20060179098A1 (en) | System and method for reduction of leading zero detect for decimal floating point numbers | |
| JP3137131B2 (en) | Floating point multiplier and multiplication method | |
| JPH09292977A (en) | Approximate value generation circuit for logarithmic function | |
| KR100974190B1 (en) | Complex multiplication method using floating point | |
| CN118921067B (en) | A data encoding method, operation method, device, equipment and medium | |
| JP2764975B2 (en) | Precision floating point arithmetic processing unit | |
| CN119645346A (en) | Mixed-precision multiply-add operation hardware | |
| CN120654651A (en) | IEEE 754 double-precision floating point number rapid printing method and system based on AVX-512 instruction set | |
| JPH0887399A (en) | Normalizer using redundant shift number prediction and shift error correction | |
| JP2513354B2 (en) | Floating point arithmetic auxiliary circuit | |
| KR200222599Y1 (en) | Floating point type normalizer | |
| JPH03100722A (en) | Processing system for accuracy conversion instruction | |
| JP3522387B2 (en) | Pipeline arithmetic unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19980120 |