JPH0117174B2 - - Google Patents

Info

Publication number
JPH0117174B2
JPH0117174B2 JP17723181A JP17723181A JPH0117174B2 JP H0117174 B2 JPH0117174 B2 JP H0117174B2 JP 17723181 A JP17723181 A JP 17723181A JP 17723181 A JP17723181 A JP 17723181A JP H0117174 B2 JPH0117174 B2 JP H0117174B2
Authority
JP
Japan
Prior art keywords
data
digits
exponent
digit
display
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
Application number
JP17723181A
Other languages
Japanese (ja)
Other versions
JPS5880735A (en
Inventor
Hisashi Ito
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP17723181A priority Critical patent/JPS5880735A/en
Publication of JPS5880735A publication Critical patent/JPS5880735A/en
Publication of JPH0117174B2 publication Critical patent/JPH0117174B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Calculators And Similar Devices (AREA)
  • Digital Computer Display Output (AREA)

Description

【発明の詳細な説明】 本発明は小型電子式計算機における指数データ
表示方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an index data display method in a small electronic calculator.

従来における関数演算機能を備えた小型電子式
計算機つまり関数計算機では、その入力範囲は指
数をxとすると、|x|<1×10100であり、数値
の保持する範囲も同じである。従つて|x|1
×10100になればオーバーフローとしてエラー表
示にし、|x|1×10-100になればアンダーフ
ローとして0表示にしている。この場合、オーバ
ーフロー、アンダーフローのチエツクは個々の演
算後に実施している。
In a conventional small electronic calculator, that is, a functional calculator, which is equipped with a functional calculation function, the input range thereof is |x|<1×10 100 , where x is the exponent, and the range in which numerical values are held is also the same. Therefore |x|1
When it reaches ×10 100 , an error is displayed as an overflow, and when it reaches |x|1×10 -100 , it is displayed as an underflow and 0 is displayed. In this case, overflow and underflow checks are performed after each calculation.

しかしながら、上記演算方式を用いた従来の関
数計算機では、最終結果の答は表示可能でありな
がら、演算途中でオーバーフロー、アンダーフロ
ーとなり、答が求められない場合がある。例えば
r=√22の式において、|x|×1050又は
|y|1×1050の場合、x2又はy2の演算でオー
バーフローとなるためエラーとして処理される。
However, in conventional functional calculators using the above calculation method, although the final result can be displayed, overflow or underflow may occur during the calculation, and the answer may not be obtained. For example, in the expression r=√ 2 + 2 , if |x|×10 50 or |y|1×10 50 , an overflow occurs in the operation of x 2 or y 2 and is treated as an error.

また、tan hx=ex−e-x/ex+e-xの式において、 |x|230の時、exがオーバーフローとなり、
答が求まらない。この場合、実際の答はtan hx
=±1となる。
Also, in the formula tan hx=e x −e -x /e x +e -x , when |x|230, e x overflows,
I can't find an answer. In this case the actual answer is tan hx
= ±1.

さらに、関数計算機以外の計算機例えばプログ
ラム電卓において、計算式をプログラムに組んで
実行する場合、演算途中でオーバーフロー、アン
ダーフローとなり、正しい値が求められない場合
が多い。また、プログラムを組む時に、上記のこ
とを考慮して計算式を変形して求めなければなら
ないという問題があつた。
Furthermore, when a calculation formula is programmed and executed in a computer other than a functional calculator, such as a program calculator, overflow or underflow occurs during the calculation, and correct values are often not obtained. In addition, when creating a program, there was a problem in that calculation formulas had to be transformed in consideration of the above.

本発明は上記の点に鑑みてなされたもので、指
数部及び仮数部を流動的に構成することによつて
表示できる数値範囲を拡大し、従来では求められ
なかつた計算を可能とすることができる指数デー
タ表示方式を提供することを目的とする。
The present invention has been made in view of the above points, and by fluidly configuring the exponent part and the mantissa part, the range of numerical values that can be displayed can be expanded, and calculations that could not be performed in the past can be made possible. The purpose is to provide a method for displaying index data that is possible.

以下図面を参照して本発明の一実施例を説明す
る。第1図において1はキー入力部で、このキー
入力部1から入力されたデータは制御部2へ送ら
れる。この制御部2は例えばROM(リード・オ
ンリ・メモリ)により構成されて各種マイクロプ
ログラムを記憶しており、出力ラインaよりキー
操作に応じたデータ、出力ラインb,cよりアド
レス、出力ラインdより各種インストラクシヨン
を出力する。上記制御部2の出力ラインa,bか
ら出力されるデータ及びアドレスはセレクタ3へ
送られる。このセレクタ3は、上記制御部2から
のアドレスに従つて入出力ラインを選択し、その
選択データを演算用メモリ4へ転送する。この演
算用メモリ4は、例えばXレジスタ4a,Yレジ
スタ4b,Zレジスタ4c等の各種演算用レジス
タによつて構成されている。上記レジスタ4a,
4b…等は、例えば第2図に示すように15桁構成
で、0桁目から3桁目までが指数部、4桁目から
14桁目までが仮数部となつている。さらに、上記
指数部は0〜3桁目に指数データを記憶し、3桁
目の第3ビツトに指数桁の正負を示す符号、第4
ビツトに仮数部の正負を示す符号を記憶するよう
になつている。しかして、上記メモリ4内の各レ
ジスタ4a,4b…に書込まれたデータはセレク
タ5へ送られる。このセレクタ5は、制御部2か
ら出力ラインcを介して与えられるアドレスに従
つて入出力ラインを選択し、その選択データを演
算回路6、指数桁検出部7、指数桁数判別部8に
出力する。上記指桁数検出部7は、制御部2の出
力ラインdから与えられるインストラクシヨンに
従つて指数桁の位置を検出し、その検出信号を制
御部2、演算回路6及び指数桁数判別部8へ与え
る。この指数桁数判別部8は、指数桁数を判別し
てその判別結果を表示制御部9へ与える。一方、
上記演算回路6はセレクタ5から入力されるデー
タに対する演算を行ない、その演算結果をセレク
タ3を介してメモリ4へ出力すると共に表示制御
部9へ出力する。また、演算回路6は、演算結果
に対してデータの有無、キヤリー信号の有無等を
判別する判別部を内部に備え、その判別結果Jを
制御部2へ送出する。また、上記表示制御部9
は、指数桁数判別部8の判別結果に従つて指数部
及び仮数部の桁数制御を行なつて表示部10にデ
ータを表示する。この表示部10は表示桁数が例
えば10桁構成となつており、指数表示の場合は下
位3桁で指数を表示し、上位6桁あるいは7桁で
仮数を表示する。
An embodiment of the present invention will be described below with reference to the drawings. In FIG. 1, reference numeral 1 denotes a key input section, and data input from this key input section 1 is sent to a control section 2. This control unit 2 is composed of, for example, a ROM (read-only memory) and stores various microprograms, and outputs data corresponding to key operations from output line a, addresses from output lines b and c, and output line d from output line d. Output various instructions. Data and addresses output from output lines a and b of the control section 2 are sent to the selector 3. This selector 3 selects an input/output line according to the address from the control section 2, and transfers the selected data to the calculation memory 4. The calculation memory 4 is composed of various calculation registers such as an X register 4a, a Y register 4b, and a Z register 4c. The register 4a,
4b...etc., for example, has a 15-digit structure as shown in Figure 2, with the 0th to 3rd digit being the exponent part and the 4th to 4th digit being the exponent part.
The 14th digit is the mantissa. Furthermore, the exponent part stores exponent data in the 0th to 3rd digits, and the 3rd bit of the 3rd digit is a sign indicating the sign indicating the sign of the exponent digit, and the 4th
The bit stores a sign indicating the significand of the significand. Thus, the data written in each register 4a, 4b, . . . in the memory 4 is sent to the selector 5. This selector 5 selects an input/output line according to the address given from the control unit 2 via the output line c, and outputs the selected data to the arithmetic circuit 6, exponent digit detection unit 7, and exponent digit number determination unit 8. do. The finger digit number detection section 7 detects the position of the exponent digit according to instructions given from the output line d of the control section 2, and transmits the detection signal to the control section 2, the arithmetic circuit 6 and the exponent digit number discriminating section. Give to 8. The exponent digit number determination unit 8 determines the exponent digit number and provides the determination result to the display control unit 9. on the other hand,
The arithmetic circuit 6 performs arithmetic operations on the data input from the selector 5, and outputs the result of the arithmetic operation to the memory 4 via the selector 3 and to the display control section 9. Further, the arithmetic circuit 6 includes a discriminating section for discriminating the presence or absence of data, the presence or absence of a carry signal, etc. in the arithmetic result, and sends the discrimination result J to the control section 2. In addition, the display control section 9
controls the number of digits of the exponent part and the mantissa part according to the determination result of the exponent digit number determination part 8, and displays the data on the display part 10. The display unit 10 has a display digit number of, for example, 10 digits, and in the case of exponent display, the lower three digits display the exponent, and the upper six or seven digits display the mantissa.

次に上記実施例の動作を説明する。本発明はデ
ータの保持形式を|x|<1×101000とし、指数
部が−99〜99の範囲では仮数部n桁、指数部2桁
を表示する。そして、指数部が3桁となる場合、
すなわち、−999〜−100,100〜999の範囲では仮
数部をn−1桁として指数部3桁を表示するよう
にしたものである。以下その詳細を第3図のフロ
ーチヤートを参照して√(123×10492+(456×
10492の演算を行なう場合について説明する。第
4図は上記の演算を行なう場合のキー操作、レジ
スタの記憶状態、表示部10の表示状態を示した
ものである。まず、キー入力部1から第4図1に
示すように「123」「EXP」「49」のキー入力を行
なうと、Xレジスタ4aの仮数部に「123」が置
数され、指数部に「49」が置数される。そして、
このXレジスタ4aに保持されたデータが演算回
路6を介して表示制御部9へ送られ、表示部9に
おいて「123. 49」の表示が行なわれる。次に2
乗演算を行なわせるために第4図2に示すように
「x2」のキー操作を行なうと第3図の演算フロー
が開始される。まず、ステツプS1において仮数、
指数処理が行なわれ、Xレジスタ4aに保持され
ている仮数データ「123」の1桁目の位置が小数
点指定されて「1.23」となると共に指数「49」が
「+2」されて「51」となる。またこの場合、小
数点の位置がXレジスタ4aの13桁目となるよう
にデータがシフトされる。次にステツプS2に進
み、Xレジスタ4aの保持データが演算回路6に
読出されてx2の演算処理つまり「(1.23×10512
の演算が行なわれ、その演算結果「1.5129×
10102」が第4図2に示すように再びXレジスタ
4aに書込まれる。次いでステツプS3において、
Xレジスタ4aの指数データが3桁以下かあるい
は3桁より大きいかを判断し、3桁より大きい場
合にはエラーとして処理する。また、指数データ
が3桁以下であればステツプS4へ進み、指数桁数
判別部8で指数データの桁数が何桁であるかを判
別する。このステツプS4において指数データが3
桁であると判別された場合はステツプS52桁であ
ると判別された場合はステツプS6、1桁であると
判別された場合はステツプS7へ進む。上記ステツ
プS5ではXレジスタ4aの4桁目から13桁目つま
りX4〜13の仮数データ及び指数部の0桁目から2
桁目つまりX0〜2の3桁の指数データを表示制御
部9へ送り、X4〜13のデータを有無最下位桁のデ
ータが表示部10の5桁目に一致するまで桁下げ
し、表示部10の10桁目から5桁目、つまり上位
6桁において表示する。この場合、データの桁数
が表示桁数つまり6桁より多い場合には、データ
の最上位桁が表示部10の最上位桁に一致するま
で桁下げし、下位のオーバーフローした分は切捨
てる。また、指数データはそのまま表示部10の
下位3桁において表示する。また、ステツプS6
は、Xレジスタ4aのX4〜13の仮数データ及び
X0〜1の2桁の指数データを表示制御部9へ送り、
X4〜13の有無最下位桁のデータが表示部10の4
桁目に一致するまで桁下げし、表示部10の10桁
目から4桁目、つまり上位7桁において表示す
る。この場合、データの桁数が表示桁数より多い
場合には、上記ステツプS5と同様のデータシフト
処理及びオーバーフローデータの切捨て処理を行
なう。また、ステツプS4で指数データが1桁であ
ると判断されてステツプS7へ進む場合は、指数表
示を行なわなくてもデータ表示ができるので、そ
の指数に応じて仮数データの小数点処理を行なつ
た後、ステツプS7に示すようにXレジスタ4aの
X4〜13のデータを表示制御部9へ送る。そして、
この表示制御部9でデータの桁下げ処理を行なつ
た後、表示部10の全桁を利用して表示する。し
かして、上記x2の演算処理を行なつた場合には、
その指数データは「102」で3桁となつているの
で、ステツプS4からステツプS5へ進み、表示部1
0において第4図2に示すように「1.5129 102」」
の表示が行なわる。続いて第4図3に示すように
「+」キーの操作を行なうと、Xレジスタ4aの
内容がセレクタ5、演算回路6、セレクタ3を介
してYレジスタ4bに転送される。そして、第4
図4に示すように次の演算データ「456」「EXP」
「49」の入力を行なうと、この演算データはXレ
ジスタ4aに書込まれ、表示部10において
「456.49」と表示される。次に第4図5に示すよ
うに「x2」のキーを操作すると、第3図に示す演
算フローにより上記したと同様の処理が行なわれ
る。すなわち、ステツプS1で仮数、指数処理によ
り小数点の位置が最上桁に移動して「4.56×
1051」となり、ステツプS3でその2乗演算が行な
われ、「2.07936×10103」の演算結果が求められ
る。この場合の指数データは3桁であるので、ス
テツプS4からステツプS5に進み、第4図2の場合
と同様の表示処理が行なわれ、表示部10におい
て「2.07936 103」の表示が行なわれる。そして、
最後に「√ 」キーを操作すると、第3図のフロ
ーにおけるステツプS2において、Yレジスタ4b
の内容「1.5129×10102」とXレジスタ4aの内容
「2.079360×10103」との加算が行なわれると共に、
その加算結果に対する平方根「4.722975757×
1051」が求められ、Xレジスタ4aに書込まれ
る。この場合の指数データは2桁であるのでステ
ツプS4からステツプS6へ進み、その表示処理によ
り「4.722975 51」の最終結果データが表示部1
0で表示される。
Next, the operation of the above embodiment will be explained. In the present invention, the data storage format is |x|<1×10 1000 , and when the exponent part is in the range of -99 to 99, n digits for the mantissa and 2 digits for the exponent are displayed. And if the exponent part is 3 digits,
That is, in the range of -999 to -100 and 100 to 999, the mantissa is n-1 digits and the exponent part is 3 digits. For details, refer to the flowchart in Figure 3 below.√(123×10 49 ) 2 +(456×
10 49 ) The case of performing the operation 2 will be explained. FIG. 4 shows the key operations, the storage state of the register, and the display state of the display unit 10 when performing the above calculation. First, when "123", "EXP", and "49" are entered from the key input section 1 as shown in FIG. 1, "123" is placed in the mantissa part of the 49" is set. and,
The data held in the X register 4a is sent to the display control section 9 via the arithmetic circuit 6, and "123.49" is displayed on the display section 9. Next 2
When the "x 2 " key is operated as shown in FIG. 4 to perform a multiplication operation, the operation flow shown in FIG. 3 is started. First, in step S1 , the mantissa,
Exponential processing is performed, and the position of the first digit of the mantissa data "123" held in the Become. In this case, the data is shifted so that the decimal point is at the 13th digit of the X register 4a. Next, the process advances to step S2 , where the data held in the X register 4a is read out to the arithmetic circuit 6, and the arithmetic operation of x2 is performed, that is, "(1.23×10 51 ) 2 ".
is calculated, and the calculation result is ``1.5129×
10 102 '' is again written to the X register 4a as shown in FIG. Then, in step S3 ,
It is determined whether the exponent data in the X register 4a is less than or equal to 3 digits or greater than 3 digits, and if it is greater than 3 digits, it is treated as an error. If the exponent data is 3 digits or less, the process proceeds to step S4 , where the exponent digit number determining unit 8 determines how many digits the exponent data has. In this step S4 , the index data is 3.
If it is determined that it is a digit, proceed to step S5 . If it is determined that it is two digits, proceed to step S6 . If it is determined that it is one digit, proceed to step S7 . In step S5 above, the mantissa data of the 4th to 13th digits of the X register 4a, that is, the mantissa data of
The 3-digit exponent data of the digits X 0 to 2 is sent to the display control unit 9, and the data of X 4 to 13 is lowered until the data of the lowest digit matches the 5th digit of the display unit 10. It is displayed in the 10th to 5th digits of the display unit 10, that is, the upper six digits. In this case, if the number of digits of the data is greater than the number of display digits, that is, six digits, the data is down-digited until the most significant digit of the data matches the most significant digit of the display section 10, and the lower overflow is discarded. Further, the index data is displayed as is in the lower three digits of the display section 10. In addition, in step S6 , the mantissa data of X4 to X13 in the X register 4a and
Send the two-digit index data of X 0 to 1 to the display control section 9,
X Presence or absence of 4 to 13 The data of the lowest digit is 4 on the display section 10
The digit is lowered until it matches the digit, and the display unit 10 displays the digits from the 10th digit to the 4th digit, that is, the upper 7 digits. In this case, if the number of digits of the data is greater than the number of displayed digits, data shift processing and overflow data truncation processing similar to step S5 above are performed. Furthermore, if it is determined in step S4 that the exponent data is one digit and the process proceeds to step S7 , the data can be displayed without displaying the exponent, so the decimal point of the mantissa data is processed according to the exponent. After the X register 4a is adjusted, as shown in step S7 .
Send the data of X 4 to 13 to the display control section 9. and,
After the display control unit 9 performs data down-down processing, all digits of the display unit 10 are used to display the data. Therefore, when performing the above calculation of x 2 ,
Since the index data is "102", which is 3 digits, proceed from step S4 to step S5 , and display section 1.
0, "1.5129 102" as shown in Figure 4 2
will be displayed. Subsequently, as shown in FIG. 4, when the "+" key is operated, the contents of the X register 4a are transferred to the Y register 4b via the selector 5, arithmetic circuit 6, and selector 3. And the fourth
As shown in Figure 4, the following calculation data "456""EXP"
When "49" is input, this calculation data is written into the X register 4a and displayed on the display section 10 as "456.49". Next, when the "x 2 " key is operated as shown in FIG. 4, the same processing as described above is performed according to the calculation flow shown in FIG. That is, in step S1 , the decimal point is moved to the highest digit by mantissa and exponent processing, and becomes ``4.56×
10 51 ”, and the square calculation is performed in step S 3 to obtain the calculation result of “2.07936×10 103 ”. Since the index data in this case is three digits, the process proceeds from step S4 to step S5 , where the same display processing as in the case of FIG. . and,
Finally, when the ``√'' key is operated, the Y register 4b is
The content "1.5129×10 102 " and the content "2.079360×10 103 " of the X register 4a are added, and
The square root of the addition result is “4.722975757×
10 51 '' is determined and written to the X register 4a. Since the index data in this case is two digits, the process proceeds from step S4 to step S6 , and the final result data of "4.722975 51" is displayed on the display section 1.
Displayed as 0.

なお、上記実施例では指数桁を「2」、「3」桁
としたが、「4」、「5」桁というようにしてもよ
い。
In the above embodiment, the exponent digits are "2" and "3" digits, but they may be "4" and "5" digits.

以上述べたように本発明によれば、指数部及び
仮数部を流動的に構成し、指数データの桁数に応
じて仮数部の表示桁数を可変するようにしたの
で、表示できる数値範囲を拡大でき、従来の演算
方法では求められなかつた計算が可能となり、実
用上極めて大きな効果を発揮し得るものである。
As described above, according to the present invention, the exponent part and the mantissa part are configured fluidly, and the number of displayed digits of the mantissa part is changed according to the number of digits of the exponent data, so that the numerical range that can be displayed is It can be expanded, and calculations that could not be performed using conventional calculation methods can be performed, and can be extremely effective in practice.

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

図面は本発明の一実施例を示すもので、第1図
は回路構成を示すブロツク図、第2図は第1図に
おけるレジスタの詳細な構成を示す図、第3図は
動作内容を示すフローチヤート、第4図1〜6は
キー操作に伴うレジスタ内容の変化及び表示内容
の変化を示す図である。 1……キー入力部、2……制御部、4……演算
用メモリ、7……指数桁検出部、8……指数桁数
判別部。
The drawings show one embodiment of the present invention; FIG. 1 is a block diagram showing the circuit configuration, FIG. 2 is a diagram showing the detailed configuration of the register in FIG. 1, and FIG. 3 is a flowchart showing the operation contents. Chart 4, FIGS. 1 to 6 are diagrams showing changes in register contents and changes in display contents accompanying key operations. 1...Key input unit, 2...Control unit, 4...Memory for calculation, 7...Exponent digit detection unit, 8...Exponent digit number determination unit.

Claims (1)

【特許請求の範囲】[Claims] 1 指数演算機能を備えた小型電子式計算機にお
いて、演算データにおける指数の桁数を検出する
手段と、この手段により検出した指数の桁数に応
じて仮数データの桁数を可変して表示部に表示す
る手段とを具備したことを特徴とする指数データ
表示方式。
1. In a small electronic calculator equipped with an exponent calculation function, there is a means for detecting the number of digits of the exponent in the calculation data, and a display unit that changes the number of digits of the mantissa data according to the number of digits of the exponent detected by this means. An index data display method characterized by comprising: display means.
JP17723181A 1981-11-06 1981-11-06 Display system of exponent data Granted JPS5880735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17723181A JPS5880735A (en) 1981-11-06 1981-11-06 Display system of exponent data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17723181A JPS5880735A (en) 1981-11-06 1981-11-06 Display system of exponent data

Publications (2)

Publication Number Publication Date
JPS5880735A JPS5880735A (en) 1983-05-14
JPH0117174B2 true JPH0117174B2 (en) 1989-03-29

Family

ID=16027440

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17723181A Granted JPS5880735A (en) 1981-11-06 1981-11-06 Display system of exponent data

Country Status (1)

Country Link
JP (1) JPS5880735A (en)

Also Published As

Publication number Publication date
JPS5880735A (en) 1983-05-14

Similar Documents

Publication Publication Date Title
US6138135A (en) Propagating NaNs during high precision calculations using lesser precision hardware
JPH0145649B2 (en)
JPH0117174B2 (en)
JPH0140001Y2 (en)
JP3252493B2 (en) Electronic calculator and its calculation processing method
JP3498323B2 (en) Electronic calculator and arithmetic processing method
JPS6210828Y2 (en)
JPS6321939B2 (en)
JPH0429961B2 (en)
JP4193773B2 (en) Arithmetic control device and program
JPS642179Y2 (en)
JPS61188624A (en) Fixed point arithmetic unit
JPH021627Y2 (en)
JPS6234352Y2 (en)
JPS5911947B2 (en) electronic desk calculator
JPS6235138B2 (en)
JPS63310019A (en) Data processor
JPS5940665Y2 (en) Power calculation control device
JPH0769785B2 (en) Divider
JPS6118788B2 (en)
JPS6131891B2 (en)
JPS6224816B2 (en)
JPH0532781B2 (en)
JPS59846B2 (en) Index display method
JPH07120273B2 (en) Divider