JP3567576B2 - Electronic computer - Google Patents

Electronic computer Download PDF

Info

Publication number
JP3567576B2
JP3567576B2 JP34135395A JP34135395A JP3567576B2 JP 3567576 B2 JP3567576 B2 JP 3567576B2 JP 34135395 A JP34135395 A JP 34135395A JP 34135395 A JP34135395 A JP 34135395A JP 3567576 B2 JP3567576 B2 JP 3567576B2
Authority
JP
Japan
Prior art keywords
data
input
arithmetic
calculation
expression
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 - Fee Related
Application number
JP34135395A
Other languages
Japanese (ja)
Other versions
JPH09179722A (en
Inventor
卓也 真下
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 JP34135395A priority Critical patent/JP3567576B2/en
Publication of JPH09179722A publication Critical patent/JPH09179722A/en
Application granted granted Critical
Publication of JP3567576B2 publication Critical patent/JP3567576B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Calculators And Similar Devices (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、入力された演算式を演算処理してその演算結果を表示する電子計算機に関する。
【0002】
【従来の技術】
一般に、電子計算機では、所望の演算式をキー入力して表示させ、演算の実行を指示すると、RAMに記憶保持した演算式に従ってCPUにて演算処理が実行され、その演算結果が表示部に表示される。
【0003】
この場合、CPUによる演算処理の途中経過に伴ない、様々な数値データを例えばRAM内のワークエリアに一時的に書き込んだり、このワークエリアに書き込んだ数値データを再びCPUに読み込んで演算処理したり、演算結果が得られるまでに何回もの様々な数値データの処理ややり取りが必要になるが、例えば前記RAM内のワークエリアにおける数値データの最大記憶可能桁数やCPUにおける数値データの最大処理可能桁数は、RAMやCPUの仕様によって予め制限されている。
【0004】
【発明が解決しようとする課題】
このため、演算に伴ない処理される数値データの桁数が多くなり、前記RAMにおける最大記憶可能桁数やCPUにおける最大処理可能桁数を越えると、その最大可能桁数を越えた分について下位側の桁が省略されて演算される、所謂、桁落ちが生じるため、正確な演算結果が答えとして得られないことがある。
【0005】
図6は従来の電子計算機における“247”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図である。
【0006】
データ入力キーを操作して“247”の演算式を入力し、「EXE」キーにより演算の実行を指示すると、CPUにおける演算処理によりその答え“1407…5325”が表示されるが、この答えには桁落ちの影響による誤差が生じており、“247”の正確な答え“1407…5328”を得ることはできない。
【0007】
従って、演算桁数の多い演算処理にあっては、答えとして得られた数値データの下位桁に、桁落ちの影響による誤差が生じてしまうという問題がある。
本発明は前記のような問題に鑑みなされたもので、演算処理される数値データの下位桁に桁落ちが生じた場合でも、正確な答えを得ることが可能になる電子計算機を提供することを目的とする。
【0008】
【課題を解決するための手段】
すなわち、本発明に係わる電子計算機は、入力された演算式データを演算処理して演算結果を表示する電子計算機であって、演算を行なうための演算式データを入力する式入力手段と、この式入力手段により入力された演算式データの演算を実行する演算手段と、予め定められた演算データと数値データとを対応させて複数記憶している記憶手段と、前記式入力手段により入力された演算式データが、前記記憶手段に記憶された複数の演算データのいずれかと一致しているか否かを判断する判断手段と、この判断手段により前記式入力手段により入力された演算式データが前記記憶手段に記憶された複数の演算データのいずれかと一致していると判断された際、前記演算手段により得られた答えの一部を前記演算データに対応して前記記憶手段に記憶されている数値データに置き換えて正確な演算結果として修正する演算結果修正手段と、この演算結果修正手段により正確な演算結果として修正された値を前記入力手段により入力された演算式データの答えとして表示させる表示手段とを具備したことを特徴とする。
【0009】
つまり、本発明に係わる電子計算機では、入力された演算式データを演算処理して演算結果を表示するものであり、例えば2m 式等の数値桁数が多くなる複数の演算データとそのそれぞれの演算結果の桁落ちに影響される下位n桁の数値データとを対応付けて予め記憶しておき、式入力手段により入力された演算式データが前記予め記憶した複数の演算データのいずれかに一致していると判断された際には、演算式データの演算を実行する演算手段により得られた答えの一部(下位n桁)が前記演算データに対応して前記予め記憶した数値データに置き換えられて正確な演算結果に修正され、答えとして表示されることになる。
【0010】
【発明の実施の形態】
以下図面により本発明の実施の形態について説明する。
図1は本発明の実施形態に係わる電子計算機の電子回路の構成を示すブロック図である。
【0011】
この電子計算機は、CPU11を備えている。
前記CPU11は、キー入力部12からのキー操作信号に応じてROM13に予め記憶されているシステムプログラムを起動させ、回路各部の動作制御を実行するもので、このCPU11には、前記キー入力部12,ROM13の他、RAM14、表示駆動回路15、及び液晶表示部16が接続される。
【0012】
前記キー入力部12には、英字,数字,演算子キー等、所望の式を変数や数値,演算子等の組合せにより入力するためのデータ入力キー12a、このデータ入力キー12aにより入力された演算式に従った演算処理を実行させる際に操作される「EXE」キー12b等が備えられる。
【0013】
前記ROM13には、この電子計算機の全体の動作を制御するシステムプログラムが予め記憶されると共に、各種演算制御用のサブプログラムも予め記憶される。
【0014】
また、前記ROM13には、検索用テーブルデータ13a及び補正用テーブルデータ13bも予め記憶される。
図2は前記電子計算機のROM13に予め記憶されるテーブルデータの内容を示す図であり、同図(A)は検索用テーブルデータ13aの一例を示す図、同図(B)は補正用テーブルデータ13bの一例を示す図である。
【0015】
検索用テーブルデータ13aには、例えば演算使用頻度が高く且つ演算に伴なう数値桁数の多い桁落ちの影響を受ける2 (本実施形態ではm=46)以上の複数の定型演算式が個々のアドレスに対応付けられて予め記憶される。
【0016】
補正用テーブルデータ13bには、前記検索用テーブルデータ13aに記憶された複数の定型演算式の個々のアドレスに対応付けて、各演算式それぞれを演算した答えのうち桁落ちに影響される下位4桁の数値データが予め記憶される。
【0017】
前記RAM14には、被表示データがその描画データとして書込まれる表示レジスタ14a、キー入力部12におけるデータ入力キー12aの操作に伴ない入力された演算データに対応する演算式が前記ROM13内の検索用テーブルデータ13aから検索された際に“1”にセットされる演算式検索フラグレジスタF、このフラグレジスタFに“1”がセットされ際に前記検索用テーブルデータ13aにて検索された演算式に対応するアドレスNoが記憶されるアドレスNoレジスタ14b、そして、前記CPU11を中心とする各種演算処理の過程にて入出力されるデータが一時的に記憶保持されるワークエリア14c等が備えられる。
【0018】
次に、前記構成による電子計算機の動作について説明する。
図3は前記電子計算機における演算処理を示すフローチャートである。
図4は前記電子計算機における“247”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図である。
【0019】
図4(A)に示すように、キー入力部12のデータ入力キー12aを操作して演算したい演算式データ“247”を入力すると、入力された演算式データはRAM14内の表示レジスタ14aに対して表示データとして展開され、表示駆動回路15を介して液晶表示部16に表示される(ステップS1→S2,S3)。
【0020】
そして、キー入力部12の「EXE」キー12bを操作して前記入力表示された演算式データ“247”の演算実行を指示すると、当該入力された演算式データ“247”に対応する同一の演算式が、ROM13内の検索用テーブルデータ13a「図2(A)参照」に予め記憶された複数の定型演算式の中から検索される(ステップS4→S5)。
【0021】
ここで、前記キー入力表示された演算式データ“247”と対応する同一の演算式が前記検索用テーブルデータ13aの中から検索されると、RAM14内の演算式検索フラグレジスタFに“1”がセットされ、検索された演算式“247”の記憶エリアを示すアドレスNo“2”がRAM14内のアドレスNoレジスタ14bに記憶される(ステップS6→S7,S8)。
【0022】
すると、前記入力された演算式データ“247”に従って、CPU11における演算処理が実行される(ステップS9)。
この場合、前記CPU11における演算処理では、予め演算処理可能桁数が制限されるため、桁数の多い数値データには桁落ちが生じることになり、前記ステップS9における“247”の演算結果(答え)は、下位1桁目に桁落ちによる誤差の含まれた“1407…5325”として算出される。
【0023】
こうして、入力された演算式データ“247”の演算結果(答え)が、CPU11にて一旦算出された状態で、RAM14内の演算式検索フラグレジスタFに“1”がセットされていると判断されると、同RAM14内のアドレスNoレジスタ14bに記憶されているアドレスNo“2”に従って、ROM13内の補正用テーブルデータ13bに記憶されている4桁の補正データ“5328”が読み出される(ステップS10→S11)。
【0024】
そして、前記ROM13内の補正用テーブルデータ13bから読み出された補正データ“5328”は、前記ステップS9にて既に算出されている“247”の演算結果(答え)“1407…5325”に対し、下位4桁の範囲で代入されて入れ替えられ、“247”の正確な演算結果(答え)“1407…5328”として修正される(ステップS12)。
【0025】
すると、前記RAM14内の演算式検索フラグレジスタFのフラグが“0”にリセットされ、入力式“247”の演算終了と判断されることにより、前記演算後修正の図られた正確な演算結果(答え)“1407…5328”がRAM14内の表示レジスタ14aに表示データとして展開され、図4(B)に示すように、表示駆動回路15を介して液晶表示部16に表示される(ステップS13,S14→S3)。
【0026】
これにより、CPU11における演算処理に伴ない桁落ちの影響により誤差の生じた演算結果(答え)は、その下位4桁を正しい補正データと入れ替えて修正することで、正確な演算結果(答え)として得られるようになる。
【0027】
図5は前記電子計算機における“247−328”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図である。
【0028】
この場合には、前記図3における演算処理おいて、ステップS1〜S13の処理を経て、まず、“247”の演算処理及び正確な演算結果(答え)“1407…5328”への修正がなされた後、ステップS14にて演算未終了と判断されることで、再びステップS5からの処理に復帰する。
【0029】
そして、ステップS5,S6→S9,S10→S14の処理を経て、“1407…5328−328”が演算されることで、ステップS3に移行し、演算式データ“247−328”とその正確な演算結果(答え)“1407…5000”が液晶表示部16に表示される。
【0030】
したがって、前記構成の電子計算機によれば、キー入力部12のデータ入力キー12aにより演算式データ“247”が入力されて「EXE」キー12bが操作されると、CPU11にて演算処理が開始され、桁落ちにより下位1桁目に誤差の生じた演算結果(答え)“1407…5325”が得られた後、ROM13内の検索用テーブルデータ13a及び補正用テーブルデータ13bにて予め記憶した演算式“247”に対応する正確な答えの下位4桁分の補正データ“5328”が読出され、前記CPU11にて得られた答えの下位4桁が入れ替えられ、正しい答え“1407…5328”に修正されて液晶表示部16に表示されるので、入力式の演算に伴ない処理される数値データの桁数が多くなり、例えばRAM14における最大記憶可能桁数やCPU11における最大処理可能桁数を越え、桁落ちによる演算誤差が生じた場合でも、正確な演算結果が答えとして得らるようになる。
【0031】
この場合、前記実施の形態では、ROM13内の検索用テーブルデータ13aに記憶されている複数の定型演算式に対応させて、補正用テーブルデータ13bには、各定型演算式の答えの全桁を記憶させるのではなく、桁落ちに影響される下位n桁のみを記憶させ、CPU11による演算処理後に、演算結果(答え)の下位n桁を補正データと入れ替えることで正確な値への修正を図っているので、ROM13内のメモリ容量を大幅に占有することはなく、補正データを効率的に利用することができる。
【0032】
【発明の効果】
以上のように、本発明に係わる電子計算機によれば、入力された演算式データを演算処理して演算結果を表示するものであり、例えば2m 式等の数値桁数が多くなる複数の演算データとそのそれぞれの演算結果の桁落ちに影響される下位n桁の数値データとを対応付けて予め記憶しておき、式入力手段により入力された演算式データが前記予め記憶した複数の演算データのいずれかに一致していると判断された際には、演算式データの演算を実行する演算手段により得られた答えの一部(下位n桁)が前記演算データに対応して前記予め記憶した数値データに置き換えられて正確な演算結果に修正され、答えとして表示されるようになる。
よって、演算処理される数値データの下位桁に桁落ちが生じた場合でも、正確な答えを得ることが可能になる電子計算機を提供できる。
【図面の簡単な説明】
【図1】本発明の実施形態に係わる電子計算機の電子回路の構成を示すブロック図。
【図2】前記電子計算機のROMに予め記憶されるテーブルデータの内容を示す図であり、同図(A)は検索用テーブルデータの一例を示す図、同図(B)は補正用テーブルデータの一例を示す図。
【図3】前記電子計算機における演算処理を示すフローチャート。
【図4】前記電子計算機における“247”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図。
【図5】前記電子計算機における“247−328”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図。
【図6】従来の電子計算機における“247”の演算処理に伴なう演算表示動作を示す図であり、同図(A)は演算式の入力表示状態を示す図、同図(B)は演算結果の表示状態を示す図。
【符号の説明】
11 …CPU、
12 …キー入力部、
12a…データ入力キー、
12b…「EXE」キー、
13 …ROM、
13a…検索用テーブルデータ、
13b…補正用テーブルデータ、
14 …RAM、
14a…表示レジスタ、
14b…アドレスNoレジスタ、
14c…ワークエリア、
F …演算式検索フラグレジスタ、
15 …表示駆動回路、
16 …液晶表示部。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an electronic computer that performs an arithmetic operation on an input operation expression and displays the operation result.
[0002]
[Prior art]
In general, in a computer, when a desired calculation expression is input by key and displayed, and execution of a calculation is instructed, a calculation process is executed by a CPU according to the calculation expression stored in a RAM, and the calculation result is displayed on a display unit. Is done.
[0003]
In this case, various numerical data are temporarily written in, for example, a work area in a RAM, or the numerical data written in this work area is read back into the CPU for arithmetic processing as the arithmetic processing by the CPU progresses. It is necessary to process and exchange various numerical data many times until the calculation result is obtained. For example, the maximum number of storable digits of the numerical data in the work area in the RAM or the maximum processing of the numerical data in the CPU is possible. The number of digits is limited in advance by the specifications of the RAM and the CPU.
[0004]
[Problems to be solved by the invention]
For this reason, the number of digits of numerical data to be processed accompanying the calculation increases, and when the number exceeds the maximum storable number of digits in the RAM or the maximum number of scalable digits in the CPU, the lower limit is exceeded for the number exceeding the maximum possible number of digits. Since the calculation is performed with the digit on the side omitted, that is, a so-called underflow occurs, an accurate calculation result may not be obtained as an answer.
[0005]
FIG. 6 is a diagram showing a calculation display operation accompanying the calculation process of "2 47 " in the conventional computer. FIG. 6A is a diagram showing an input display state of a calculation expression, and FIG. It is a figure showing a display state of a calculation result.
[0006]
When the operator operates the data input key to input an arithmetic expression of “2 47 ” and instructs execution of the operation by the “EXE” key, the answer “1407... 5325” is displayed by the arithmetic processing in the CPU. Has an error due to the effect of digit cancellation, and it is not possible to obtain an accurate answer “1407... 5328” of “2 47 ”.
[0007]
Therefore, in the arithmetic processing with a large number of arithmetic digits, there is a problem that an error due to the effect of the digit drop occurs in the lower digit of the numerical data obtained as an answer.
The present invention has been made in view of the above-described problems, and provides an electronic computer that can obtain an accurate answer even when a digit is lost in the lower digit of numerical data to be processed. Aim.
[0008]
[Means for Solving the Problems]
That is, an electronic computer according to the present invention is an electronic computer that performs arithmetic processing on input arithmetic expression data and displays an arithmetic result, and includes an expression input unit that inputs arithmetic expression data for performing an arithmetic operation, Calculating means for executing the operation of the operation expression data input by the input means; storage means for storing a plurality of predetermined operation data and numerical data in association with each other; Determining means for determining whether or not the expression data matches any of the plurality of operation data stored in the storage means; and determining whether the operation expression data input by the expression input means by the determination means is equal to the storage means. more when it is determined that matches one of the operation data, the storage hand part of the answer obtained by the calculating means in response to the operation data stored in To the calculation result modification means for replacing the numerical data stored to correct as an accurate calculation result, the calculation formula data input by said input means a modified value as an accurate calculation result by the calculation result modification means Display means for displaying as an answer.
[0009]
That is, in the computer according to the present invention, the input arithmetic expression data is subjected to arithmetic processing and the arithmetic result is displayed. For example, a plurality of arithmetic data having a large number of numerical digits , such as a 2 m expression, and the respective arithmetic data are displayed . The numerical data of the lower n digits affected by the digit loss of the calculation result are stored in advance in association with each other, and the calculation formula data input by the formula input means matches any of the plurality of pre-stored calculation data. When it is determined that the calculation data is calculated, a part (lower n digits) of the answer obtained by the calculation means for performing the calculation of the calculation expression data is replaced with the previously stored numerical data corresponding to the calculation data. The result is corrected to the correct calculation result and displayed as the answer.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of an electronic circuit of a computer according to an embodiment of the present invention.
[0011]
This computer has a CPU 11.
The CPU 11 activates a system program stored in advance in the ROM 13 in response to a key operation signal from the key input unit 12 and executes operation control of each circuit unit. , A ROM 13, a RAM 14, a display drive circuit 15, and a liquid crystal display unit 16.
[0012]
The key input unit 12 has a data input key 12a for inputting a desired expression such as an alphabetic character, a number, an operator key, etc. by a combination of variables, numerical values, operators, etc., and an operation input by the data input key 12a. An “EXE” key 12b and the like that are operated when executing arithmetic processing according to the formula are provided.
[0013]
In the ROM 13, a system program for controlling the entire operation of the computer is stored in advance, and sub-programs for various arithmetic controls are also stored in advance.
[0014]
The ROM 13 also stores search table data 13a and correction table data 13b in advance.
2A and 2B are diagrams showing the contents of table data stored in advance in the ROM 13 of the computer. FIG. 2A shows an example of search table data 13a, and FIG. 2B shows correction table data. It is a figure showing an example of 13b.
[0015]
In the search table data 13a, for example, a plurality of fixed arithmetic expressions of 2 m or more (m = 46 in the present embodiment) or more which are affected by a digit drop with a high frequency of use and a large number of numerical digits accompanying the calculation are included. It is stored in advance in association with each address.
[0016]
The correction table data 13b is associated with the individual addresses of the plurality of fixed-form expressions stored in the search table data 13a, and is associated with each of the lower-order four of the answers obtained by operating each of the formulas, which are affected by the digit loss. Digit numerical data is stored in advance.
[0017]
In the RAM 14, a display register 14a in which data to be displayed is written as drawing data thereof, and an arithmetic expression corresponding to the arithmetic data input in accordance with the operation of the data input key 12a in the key input unit 12, are searched in the ROM 13. Formula search flag register F which is set to "1" when retrieved from the search table data 13a, and the formula which is retrieved in the search table data 13a when this flag register F is set to "1" And a work area 14c for temporarily storing and holding data input and output in various arithmetic processing processes centered on the CPU 11.
[0018]
Next, the operation of the computer having the above configuration will be described.
FIG. 3 is a flowchart showing the arithmetic processing in the electronic computer.
4A and 4B are diagrams showing a calculation display operation accompanying the calculation process of “2 47 ” in the computer. FIG. 4A is a diagram showing an input display state of a calculation expression, and FIG. It is a figure showing a display state of a result.
[0019]
As shown in FIG. 4A, when the operation expression data “2 47 ” to be operated is input by operating the data input key 12a of the key input unit 12, the input operation expression data is stored in the display register 14a in the RAM 14. On the other hand, it is developed as display data and displayed on the liquid crystal display unit 16 via the display drive circuit 15 (steps S1 → S2, S3).
[0020]
Then, when the "EXE" key 12b of the key input unit 12 is operated to instruct the execution of the arithmetic expression data "2 47 " displayed as input, the same arithmetic operation data "2 47 " corresponding to the input arithmetic expression data "2 47 " is input. Is retrieved from a plurality of fixed formulas stored in advance in the search table data 13a (see FIG. 2A) in the ROM 13 (steps S4 → S5).
[0021]
Here, when the same operation expression corresponding to the operation expression data "2 47 " displayed by key input is searched from the search table data 13a, "1" is set in the operation expression search flag register F in the RAM 14. Is set, and the address No. “2” indicating the storage area of the retrieved arithmetic expression “2 47 ” is stored in the address No. register 14b in the RAM 14 (steps S6 → S7, S8).
[0022]
Then, the arithmetic processing in the CPU 11 is executed according to the input arithmetic expression data “2 47 ” (step S9).
In this case, in the arithmetic processing in the CPU 11, the number of digits that can be processed is limited in advance, so that numerical data having a large number of digits will lose digits, and the calculation result of “2 47 ” in the step S9 ( Answer) is calculated as “1407... 5325” that includes an error due to cancellation in the first lower digit.
[0023]
Thus, it is determined that “1” is set in the arithmetic expression search flag register F in the RAM 14 with the arithmetic result (answer) of the input arithmetic expression data “2 47 ” once calculated by the CPU 11. Then, the four-digit correction data "5328" stored in the correction table data 13b in the ROM 13 is read out according to the address No. "2" stored in the address No. register 14b in the RAM 14 (step). S10 → S11).
[0024]
Then, the correction data “5328” read from the correction table data 13b in the ROM 13 is compared with the calculation result (answer) “1407... 5325” of “2 47 ” already calculated in step S9. , Are substituted and replaced in the range of the lower four digits, and are corrected as an accurate calculation result (answer) of “2 47 ” “1407... 5328” (step S12).
[0025]
Then, the flag of the arithmetic expression search flag register F in the RAM 14 is reset to “0”, and it is determined that the arithmetic operation of the input expression “2 47 ” is completed. (Answer) "1407... 5328" is developed as display data in the display register 14a in the RAM 14, and displayed on the liquid crystal display unit 16 via the display drive circuit 15 as shown in FIG. 4B (step S13). , S14 → S3).
[0026]
As a result, the calculation result (answer) in which an error has occurred due to the effect of the digit loss accompanying the calculation processing in the CPU 11 is corrected by replacing the lower four digits with correct correction data, thereby obtaining an accurate calculation result (answer). You will be able to obtain.
[0027]
FIG. 5 is a diagram showing a calculation display operation associated with the calculation process of “2 47 -328” in the computer, and FIG. 5A is a diagram showing an input display state of a calculation expression, and FIG. FIG. 7 is a diagram showing a display state of a calculation result.
[0028]
In this case, in the arithmetic processing in FIG. 3, through the processing of steps S1 to S13, first, the arithmetic processing of “2 47 ” and the correction to the accurate arithmetic result (answer) “1407... 5328” are made. Then, when it is determined in step S14 that the calculation is not completed, the process returns to step S5 again.
[0029]
Then, after the processing of steps S5, S6 → S9, S10 → S14, "1407 ... 5328-328" that is computed, the process proceeds to step S3, calculation formula data "2 47 -328" and its exact The calculation result (answer) “1407... 5000” is displayed on the liquid crystal display unit 16.
[0030]
Therefore, according to the computer having the above configuration, when the operation formula data “2 47 ” is input by the data input key 12 a of the key input section 12 and the “EXE” key 12 b is operated, the arithmetic processing is started by the CPU 11. Then, after obtaining an operation result (answer) “1407... 5325” in which an error occurs in the lower first digit due to the digit loss, the operation stored in advance in the search table data 13a and the correction table data 13b in the ROM 13 is performed. Correction data “5328” for the lower four digits of the correct answer corresponding to the expression “2 47 ” is read out, the lower four digits of the answer obtained by the CPU 11 are replaced, and the correct answer is “1407... 5328”. Since the data is corrected and displayed on the liquid crystal display unit 16, the number of digits of numerical data to be processed in accordance with the calculation of the input expression is increased. Even if the number of digits that can be stored exceeds the maximum number of digits that can be processed by the CPU 11 and a calculation error occurs due to a digit loss, an accurate calculation result can be obtained as an answer.
[0031]
In this case, in the above-described embodiment, all digits of the answer of each of the fixed formulas are stored in the correction table data 13b in correspondence with the plurality of fixed formulas stored in the search table data 13a in the ROM 13. Instead of storing, only the lower n digits affected by the digit loss are stored, and after the arithmetic processing by the CPU 11, the lower n digits of the operation result (answer) are replaced with correction data to correct the value to an accurate value. Therefore, the memory capacity in the ROM 13 is not occupied significantly, and the correction data can be used efficiently.
[0032]
【The invention's effect】
As described above, according to the computer according to the present invention, which displays the operation result input arithmetic expression data processing to, for example, a plurality of operations numerical digits increases such 2 m Formula The data and the lower-order n-digit numerical data that are affected by the digit loss of the respective calculation results are stored in advance in association with each other, and the calculation formula data input by the formula input means is used to store the plurality of previously stored calculation data. If it is determined that any one of the following is true, a part (lower n digits) of the answer obtained by the calculating means for executing the operation of the operation expression data is stored in advance in correspondence with the operation data. The data is replaced with the calculated numerical data , corrected to the correct calculation result, and displayed as an answer.
Therefore, it is possible to provide an electronic computer capable of obtaining an accurate answer even when a digit is lost in the lower digit of the numerical data to be processed.
[Brief description of the drawings]
FIG. 1 is an exemplary block diagram showing the configuration of an electronic circuit of an electronic computer according to an embodiment of the present invention.
FIG. 2 is a diagram showing contents of table data stored in a ROM of the computer in advance, wherein FIG. 2A shows an example of search table data, and FIG. 2B shows correction table data; FIG.
FIG. 3 is a flowchart showing a calculation process in the computer.
4A and 4B are diagrams showing a calculation display operation accompanying the calculation process of “2 47 ” in the computer. FIG. 4A is a diagram showing an input display state of a calculation expression, and FIG. The figure which shows the display state of a calculation result.
5A and 5B are diagrams showing a calculation display operation accompanying the calculation process of “2 47 -328” in the computer. FIG. 5A is a diagram showing an input display state of a calculation expression, and FIG. () Is a diagram showing a display state of a calculation result.
6A and 6B are diagrams showing a calculation display operation accompanying the calculation process of “2 47 ” in a conventional computer. FIG. 6A is a diagram showing an input display state of a calculation expression, and FIG. 9 is a diagram showing a display state of a calculation result.
[Explanation of symbols]
11 ... CPU,
12 ... key input section,
12a Data input key,
12b ... "EXE" key,
13 ... ROM,
13a: table data for search,
13b: correction table data,
14 ... RAM,
14a: display register,
14b: Address No register,
14c ... work area,
F ... arithmetic expression search flag register,
15 Display drive circuit
16 Liquid crystal display unit.

Claims (2)

入力された演算式データを演算処理して演算結果を表示する電子計算機において、
演算を行なうための演算式データを入力する式入力手段と、
この式入力手段により入力された演算式データの演算を実行する演算手段と、
予め定められた演算データと数値データとを対応させて複数記憶している記憶手段と、
前記式入力手段により入力された演算式データが、前記記憶手段に記憶された複数の演算データのいずれかと一致しているか否かを判断する判断手段と、
この判断手段により前記式入力手段により入力された演算式データが前記記憶手段に記憶された複数の演算データのいずれかと一致していると判断された際、前記演算手段により得られた答えの一部を前記演算データに対応して前記記憶手段に記憶されている数値データに置き換えて正確な演算結果として修正する演算結果修正手段と、
この演算結果修正手段により正確な演算結果として修正された値を前記入力手段により入力された演算式データの答えとして表示させる表示手段と、
を具備したことを特徴とする電子計算機。
In an electronic calculator that performs arithmetic processing on input arithmetic expression data and displays an arithmetic result,
Expression input means for inputting operation expression data for performing the operation,
Calculating means for executing the calculation of the calculation formula data input by the formula input means;
Storage means for storing a plurality of predetermined operation data and numerical data in association with each other,
Determining means for determining whether or not the arithmetic expression data input by the expression input means matches any of the plurality of arithmetic data stored in the storage means ;
When the determining means determines that the arithmetic expression data input by the expression input means matches any of the plurality of arithmetic data stored in the storage means, one of the answers obtained by the arithmetic means is obtained. An operation result correction unit for replacing the unit with numerical data stored in the storage unit corresponding to the operation data and correcting the result as an accurate operation result ;
And display means causes the display as the answer of the input arithmetic expression data by the input unit the corrected value as an accurate calculation result by the calculation result correction means,
An electronic computer comprising:
前記記憶手段が記憶している数値データは、前記演算手段により得られる答えの下位n桁に対応した数値データであることを特徴とする請求項1記載の電子計算機。The numerical data storing means stores the electronic computer according to claim 1, wherein the numeric data corresponding to lower n digits of the answer obtained by the calculation means.
JP34135395A 1995-12-27 1995-12-27 Electronic computer Expired - Fee Related JP3567576B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34135395A JP3567576B2 (en) 1995-12-27 1995-12-27 Electronic computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34135395A JP3567576B2 (en) 1995-12-27 1995-12-27 Electronic computer

Publications (2)

Publication Number Publication Date
JPH09179722A JPH09179722A (en) 1997-07-11
JP3567576B2 true JP3567576B2 (en) 2004-09-22

Family

ID=18345414

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34135395A Expired - Fee Related JP3567576B2 (en) 1995-12-27 1995-12-27 Electronic computer

Country Status (1)

Country Link
JP (1) JP3567576B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4780544B2 (en) * 2004-03-25 2011-09-28 株式会社国際電気通信基礎技術研究所 Hardware simulator

Also Published As

Publication number Publication date
JPH09179722A (en) 1997-07-11

Similar Documents

Publication Publication Date Title
JP3567576B2 (en) Electronic computer
US5886910A (en) Computer with a check function
JP2985965B2 (en) Factorization device
JPS59142634A (en) Character processing device
JP3557645B2 (en) Electronic computer
JPH06168104A (en) Electronic computer
JPH0720768Y2 (en) Small electronic calculator
JPH0578056B2 (en)
JPH04250555A (en) Electronic computer
JP2000122980A (en) Calculating device and storage medium
JPH05324564A (en) Electronic computer
JP2593620B2 (en) Character processor
US4651295A (en) Electronic desk-top calculator
JPH0720767Y2 (en) Small electronic calculator
JPS6012185Y2 (en) data storage device
JPH08221367A (en) Computer with printer
JPH0555244U (en) Small electronic calculator
JPH10222472A (en) Device, method for electronic calculation and recording medium recording calculating processing program
JPS6225208B2 (en)
JPH08227399A (en) Electronic computer
JPH08137652A (en) Information processor
JPS62154052A (en) Electronic calculator equipped with file memory
JPS62224807A (en) Option parameter setting system for numerical control device
JPS6332680A (en) Mode altering apparatus for electronic type cash register
JPH05289709A (en) Programmable controller setting device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040308

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040525

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040607

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080625

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130625

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees