JPH0281226A - Calculation processor - Google Patents

Calculation processor

Info

Publication number
JPH0281226A
JPH0281226A JP63234175A JP23417588A JPH0281226A JP H0281226 A JPH0281226 A JP H0281226A JP 63234175 A JP63234175 A JP 63234175A JP 23417588 A JP23417588 A JP 23417588A JP H0281226 A JPH0281226 A JP H0281226A
Authority
JP
Japan
Prior art keywords
data
calculation
display
rounding
rounding error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP63234175A
Other languages
Japanese (ja)
Inventor
Hirotaka Sakamoto
博孝 坂本
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63234175A priority Critical patent/JPH0281226A/en
Publication of JPH0281226A publication Critical patent/JPH0281226A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

PURPOSE:To correct data so that no contradiction is generated in a result of calculation by providing a rounding error detecting part for detecting a contradiction of a result of calculation caused by a rounding error and a rounding error correcting part. CONSTITUTION:A rounding error detecting part 9 brings an intermediate result of calculation and a final result of calculation to rounding processing, respectively by a data display part 7 and outputs them to a display device 8, and also, detects the end of a calculating operation and executes a recalculation of display data in the display device 8, and detects generation of a rounding error in the display data. In such a way, when a contradiction of a result of calculation is generated, a rounding error correcting part 10 can correct automatically a part of the display data so that no contradiction is generated in a result of calculation.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は金融、会計システムなどの計算を実行する計算
処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a calculation processing device that executes calculations in financial and accounting systems.

従来の技術 計算処理プログラムは、コンピュータの誕生とともに発
展してきたが、特にオフィース・オートメイションの分
野においては、スプレッド・シート型ソフトウェアの誕
生により、ユーザ層が拡大し、より簡易なユーザ・イン
タフェースを持つスプレッド・シート型のソフトウェア
が1次々と誕生してきた。そして計算処理プログラムと
これを実行するハードウェアから構成される計算処理装
置では、1円、あるいは0.1%の誤差も許されない金
銭計算、予実算管理などへの応用が考慮され、計算誤差
が極力生じないよう設計されている。
Conventional technical calculation processing programs have evolved with the birth of computers, but especially in the field of office automation, with the birth of spreadsheet-type software, the user base has expanded, and programs with simpler user interfaces have expanded. Spreadsheet-type software has been born one after another. The calculation processing device, which consists of a calculation processing program and the hardware that executes it, is designed for applications such as financial calculations and budget management, where errors of even 1 yen or 0.1% are not allowed, and calculation errors are avoided. It is designed to prevent this from occurring as much as possible.

第4図は従来の計算処理装置を示す、キーボード1から
データが入力されると、データ入力部2がデータ・バッ
ファ3ヘデータを格納する。キーボード1から計算式が
入力されると、計算式登録部4が計算式バッファ5へ計
算式を格納する。計算式実行部6はデータ・バッファ3
の中の入力データと、計算式バッファ5の中の計算式を
もとに計算を行ない、その結果をデータ・バッファ3の
中に格納する。このデータ・バッファ3は、余裕のある
有効桁を保持することができるようになっている。デー
タ表示部7は、データ・バッファ3の中のデータを、別
の手段により先しめ指定されている書式で表示するため
に指定桁で切り捨て、切り上げ、四捨五入などの丸め処
理を行なって、デイスプレィ8に表示させる。すべての
計算はデイスプレィ8の上のデータではなく、データ・
バッファ3の中の余裕のある有効桁を持つデータを用い
て行なわれているので1表示のために丸め処理を行なっ
ていても、最終計算結果には桁落ちが発生しない。
FIG. 4 shows a conventional calculation processing device. When data is input from a keyboard 1, a data input unit 2 stores the data in a data buffer 3. When a calculation formula is input from the keyboard 1, the calculation formula registration unit 4 stores the calculation formula in the calculation formula buffer 5. The calculation formula execution unit 6 is the data buffer 3
Calculations are performed based on the input data in and the calculation formula in the calculation formula buffer 5, and the results are stored in the data buffer 3. This data buffer 3 is designed to be able to hold a sufficient amount of significant digits. The data display unit 7 performs rounding processing such as truncating, rounding up, or rounding to the specified digit in order to display the data in the data buffer 3 in a format previously specified by another means, and displays the data on the display 8. to be displayed. All calculations are done on the data, not on the display 8.
Since the data in the buffer 3 with sufficient significant digits is used, even if rounding is performed to display one, no loss of digits will occur in the final calculation result.

発明が解決しようとする課題 このような従来の構・成では、デイスプレィ8における
計算途中のパーセンテージ!の合計と1合計■のパーセ
ンテージとが一致しないという問題が発生する。具体的
には、パーセンテージIの合計(31,3+33.3+
35.3)が“99.9”であるが1合計はデータ・バ
ッファ3の中の丸めを行なっていないデータを用いて計
算が行なわれるので1合計■のパーセンテージは、” 
100.0”となる、各々の数値は四捨五入による正し
い値であるが、結果的には、  (31,3+33.3
+35.3) =100という不正な式となってしまう
、逆に、合計■が99.9と表示されるようにした場合
、 ”150/ 150 X 100冨99.9”とい
う不正な式となってしまう、これは、企業内の予実算表
や予算配分表作成に利用されると大問題となる。
Problem to be Solved by the Invention In such a conventional configuration, the percentage in the middle of calculation on the display 8! A problem arises in that the sum of 1 and the percentage of 1 total ■ do not match. Specifically, the sum of percentage I (31,3+33.3+
35.3) is "99.9", but 1 total is calculated using unrounded data in data buffer 3, so the percentage of 1 total ■ is "
100.0", each value is the correct value due to rounding, but the result is (31,3 + 33.3
+35.3) = 100, which is an invalid formula. Conversely, if the total ■ is displayed as 99.9, the invalid formula is "150/150 x 100 tonnage 99.9". This becomes a big problem if it is used to create a budget balance sheet or budget allocation table within a company.

すなわち、予算と実算が合っているにもかかわらず、こ
の計算処理システムでは、予算と実算が合わないという
現象が発生してしまう、なお、この例では単純であるた
め、この誤差を単純に見つけることが可能であるが、デ
ータ数、計算式数が増大すると、この丸めによる誤差は
極めて見付けにくくなる。
In other words, even though the budget and actual calculations match, this calculation processing system causes a phenomenon in which the budget and actual calculations do not match.However, since this example is simple, this error can be easily corrected. However, as the number of data and calculation formulas increases, it becomes extremely difficult to detect errors due to rounding.

上記のような丸め誤差の発生に気付くと、ユーザは卓上
計算器で再計算を行ない、たとえば“35.3”を“3
5.4”とデータ入力し直して1式が合うように操作し
なければならず、非常に労力を要するという問題点を有
していた。
When the user notices the rounding error as described above, he or she recalculates it on a desktop calculator and changes "35.3" to "3", for example.
5.4" data, and the operation had to be performed to make sure that one set matched, which had the problem of requiring a lot of effort.

本発明は表示データにあられれる丸め誤差を自動的に補
正できる計算処理装置を提供することを目的とする。
An object of the present invention is to provide a calculation processing device that can automatically correct rounding errors that occur in display data.

課題を解決するための手段 本発明の計算処理装置は、計算の途中結果と計算の最終
結果をそれぞれデータ表示部で丸め処理して表示装置へ
出力するとともに、計算動作の終了を検出して表示装置
における表示データの再計算を行ない、表示データ中の
丸め誤差の発生を検出する丸め誤差検出部と、丸め誤差
検出部の指示にしたがって表示データを補正する丸め誤
差補正部とを設けたことを特徴とする。
Means for Solving the Problems The calculation processing device of the present invention rounds the intermediate results of calculation and the final result of calculation in a data display section and outputs them to a display device, and also detects and displays the end of calculation operation. The present invention is characterized in that it includes a rounding error detection section that recalculates display data in the device and detects the occurrence of rounding errors in the display data, and a rounding error correction section that corrects the display data according to instructions from the rounding error detection section.

作用 この構成によると、計算が終了すると、丸め誤差検出部
が表示データの再計算を行ない、計算結果の矛盾が生じ
ていると、丸め誤差補正部が表示。
Effect: According to this configuration, when the calculation is completed, the rounding error detection unit recalculates the display data, and if there is a discrepancy in the calculation results, the rounding error correction unit displays the display data.

データの一部を計算結果に矛盾が生じないよう自動的に
補正する。
Automatically correct part of the data so that there are no inconsistencies in the calculation results.

実施例 以下、本発明の一実施例を第1図〜第3図に基づいて説
明する。なお、従来例を示す第4図と同様の作用をなす
ものには同一の符号を付けて説明する。
EXAMPLE Hereinafter, an example of the present invention will be described based on FIGS. 1 to 3. Components having the same functions as those in FIG. 4 showing the conventional example will be described with the same reference numerals.

第1図は本発明の計算処理装置を示し、第2図はそのフ
ローチャートを示す、第1図では丸め誤差による計算結
果の矛盾を検出する丸め誤差検出部9と、その丸め誤差
を補正する丸め誤差補正部10とが追加されている点が
第4図とは異なっている。
FIG. 1 shows a calculation processing device of the present invention, and FIG. 2 shows its flowchart. FIG. 1 shows a rounding error detection section 9 that detects discrepancies in calculation results due to rounding errors, and a rounding error correction section 10 that corrects the rounding errors. It differs from Fig. 4 in that it has been added.

キーボード1のキーが操作される[ステップS1]と、
データ入力部2はそれが計算処理を行なうデータである
か計算式であるかを判定〔ステップ52)L、データで
ある場合にはそのデータをデータ・バッファ3へ格納〔
ステップS3〕し、計算を実行すべきか否か判定する〔
ステップS4〕。
When keys on keyboard 1 are operated [step S1],
The data input unit 2 determines whether the data is data to be subjected to calculation processing or a calculation formula [step 52]L, and if it is data, the data is stored in the data buffer 3 [
Step S3] and determine whether the calculation should be performed [
Step S4].

計算を実行しない場合は〔ステップS9)を介してステ
ップS1へ戻る。〔ステップS2)において計算式であ
ると判定された場合には、その計算式を計算式登録部4
が計算式バッファ5へ格納(ステップ5s)L、(ステ
ップS4)が実行される。(ステップ34)において計
算式を実行すべきと判定されると、計算式実行部6がデ
ータ・バッファ3の中のデータと、計算式バッファ5の
中の計算式をもとに計算を行なう〔ステップS6〕。
If the calculation is not to be performed, the process returns to step S1 via [step S9). If it is determined in step S2 that it is a calculation formula, the calculation formula is stored in the calculation formula registration unit 4.
is stored in the calculation formula buffer 5 (step 5s), and (step S4) is executed. When it is determined in step 34 that the calculation formula should be executed, the calculation formula execution unit 6 performs calculation based on the data in the data buffer 3 and the calculation formula in the calculation formula buffer 5. Step S6].

次いで、丸め誤差検出部9が丸め処理を行なった表示デ
ータの計算結果と、データ・バッファ3の中のデータの
計算結果の突き合わせを行なって矛盾が発生していない
か判定〔ステップS7〕する。
Next, the calculation result of the display data rounded by the rounding error detection unit 9 is compared with the calculation result of the data in the data buffer 3 to determine whether a contradiction has occurred [step S7].

矛盾が発生していなければその表示データを表示する〔
ステップS93.[ステップS7]において矛盾が発生
していると判定された場合には、丸め誤差補正部IOが
補正すべき表示データを自動的に検出ならびに補正〔ス
テップS8〕したのち。
If no contradiction occurs, display the display data [
Step S93. If it is determined in [Step S7] that a contradiction has occurred, the rounding error correction unit IO automatically detects and corrects the display data to be corrected [Step S8].

〔ステップS9)においてデータ表示部7がデイスプレ
ィ8に結果を表示して〔ステップSl)へ戻る。
[Step S9) The data display unit 7 displays the result on the display 8, and the process returns to [Step Sl].

第3図は具体例説明図である。11は丸め誤差補正前の
従来のデータ表示状態、 12はデータ・バッファ3の
内のデータ状態、13は本発明による丸め誤差補正後の
データ表示状態である。
FIG. 3 is a diagram illustrating a specific example. 11 is a conventional data display state before rounding error correction; 12 is a data state in the data buffer 3; and 13 is a data display state after rounding error correction according to the present invention.

データ・バッファ3のデータ、ここではデータ状態12
は、ユーザにより指定されている書式にしたがい、あら
かじめ小数点以下2桁目を図示したように四捨五入して
、データ状態11のように表示されている。丸め誤差検
出部9は〔ステップS7)において以下のことを実行す
る。つまり、デイスプレィ8の上の四捨五入されたデー
タの合計値を算出し、  ”99.9”という値を得る
6次いで、データ・バッファ3の中の合計値を検索し、
”100.0”という値を得て、デイスプレィ8の上の
データが、” 0 、1”切り捨てられ過ぎていること
を検知する。
Data in data buffer 3, here data state 12
is displayed as data state 11, with the second decimal place rounded off as shown in the figure, according to the format specified by the user. The rounding error detection unit 9 performs the following in [step S7]. That is, calculate the total value of the rounded data on display 8 and obtain the value "99.9" 6 Then search for the total value in data buffer 3,
A value of "100.0" is obtained, and it is detected that the data on the display 8 has been truncated by "0, 1" too much.

そこで、丸め誤差補正部10は、〔ステップS8)にお
いて四捨五入された各データとデータ・バッファ3の中
のデータである四捨五入前のデータ状態12の各データ
とを突き合わせ、その中で切捨て値の最も大きい“31
.4”の値を“31.5”に補正し。
Therefore, the rounding error correction unit 10 compares each data rounded off in [step S8) with each data in the data state 12 before rounding, which is the data in the data buffer 3, and compares each data rounded off with the data in the data state 12 before rounding, and among them, the rounded-off value is the largest. “31
.. Correct the value of "4" to "31.5".

データ状態13のように表示する。この場合、切上げ過
ぎている時は、逆に最も切り上げ値の大きいデータを切
り捨てるアルゴリズムにしておく、また、自動的に補正
せず、丸め誤差が発生していることをユーザに通知する
手段を設け、その丸め誤差を自動的に補正するか、ユー
ザが補正すべきデータを指定する手段を設け、ユーザに
指定させるようにしてもよい、さらに、丸め誤差を自動
的に補正した場合、どのデータを補正したのかをユーザ
に通知する手段を設けてもよい。
Display as data state 13. In this case, when rounding is too high, an algorithm is used to round down the data with the largest rounding value, and a means is provided to notify the user that a rounding error has occurred without automatically correcting it. The rounding error may be automatically corrected, or a means for the user to specify the data to be corrected may be provided and the user may be allowed to specify it.Furthermore, if the rounding error is automatically corrected, which data has been corrected? A means for notifying the user may be provided.

発明の効果 以上のように本発明によれば、丸め誤差による計算結果
の矛盾を検出する丸め誤差検出部と、その丸め誤差を補
正する丸め誤差補正部を設けたので、丸め処理して表示
内容が見やすく、しがも四捨五入などの丸め処理による
計算結果の矛盾を検出して計算結果に矛盾が生じないよ
うデータを補正することができるので、企業内の予実算
表作成などにおいて、予算と実算が合わないといったト
ラブルを防ぐことができ、実用性の高い優れたものであ
る。
Effects of the Invention As described above, according to the present invention, a rounding error detection section that detects discrepancies in calculation results due to rounding errors and a rounding error correction section that corrects the rounding errors are provided, so that display contents can be easily viewed and displayed by rounding processing. It is possible to detect discrepancies in calculation results due to rounding processes such as rounding, and correct the data to avoid discrepancies in calculation results, so it is possible to correct discrepancies between budget and actual calculations when creating a budget-actual balance sheet within a company. This is an excellent and highly practical product that can prevent such troubles.

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

第1図は本発明の計算処理装置の一実施例の概略構成図
、第2図は同装置のフローチャート図、第3図は同装置
における誤差補正の説明図、第4図は従来の計算処理装
置の構成図である。 1・・・キーボード、2・・・データ入力部、3・・・
データ・バッファ、4・・・計算式登録部、5・・・計
算式バッファ、6・・・計算式実行部、7・・・データ
表示部、8・・・デイスプレィ、9・・・丸め誤差検出
部、10・・・丸め誤差補正部、11・・・丸め誤差補
正前の従来方法によるデータ表示状態、12・・・デー
タ・バッファ内のデータ状態、13・・・本発明による
丸め誤差補正後のデータ表示状態。 代理人   森  本  義  弘 第 ! 図 3 ?−9バッファ 第3図 第2図 第4図
Fig. 1 is a schematic configuration diagram of an embodiment of the calculation processing device of the present invention, Fig. 2 is a flowchart of the same device, Fig. 3 is an explanatory diagram of error correction in the same device, and Fig. 4 is a conventional calculation processing. It is a block diagram of a device. 1...Keyboard, 2...Data input section, 3...
Data buffer, 4... Calculation formula registration section, 5... Calculation formula buffer, 6... Calculation formula execution section, 7... Data display section, 8... Display, 9... Rounding error detection 10... Rounding error correction unit, 11... Data display state according to the conventional method before rounding error correction, 12... Data state in the data buffer, 13... Data display after rounding error correction according to the present invention situation. Agent Yoshihiro Morimoto! Figure 3? -9 buffer Figure 3 Figure 2 Figure 4

Claims (1)

【特許請求の範囲】[Claims] 1、計算の途中結果と計算の最終結果をそれぞれデータ
表示部で丸め処理して表示装置へ出力するとともに、計
算動作の終了を検出して表示装置における表示データの
再計算を行ない、表示データ中の丸め誤差の発生を検出
する丸め誤差検出部と、丸め誤差検出部の指示にしたが
って表示データを補正する丸め誤差補正部とを設けた計
算処理装置。
1. The intermediate results of calculation and the final result of calculation are each rounded in the data display section and output to the display device, and the end of the calculation operation is detected and the display data on the display device is recalculated, and the display data is A calculation processing device comprising: a rounding error detection section that detects occurrence of a rounding error; and a rounding error correction section that corrects display data according to instructions from the rounding error detection section.
JP63234175A 1988-09-19 1988-09-19 Calculation processor Pending JPH0281226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63234175A JPH0281226A (en) 1988-09-19 1988-09-19 Calculation processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63234175A JPH0281226A (en) 1988-09-19 1988-09-19 Calculation processor

Publications (1)

Publication Number Publication Date
JPH0281226A true JPH0281226A (en) 1990-03-22

Family

ID=16966844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63234175A Pending JPH0281226A (en) 1988-09-19 1988-09-19 Calculation processor

Country Status (1)

Country Link
JP (1) JPH0281226A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5398039A (en) * 1992-02-10 1995-03-14 Yazaki Corporation Displaying apparatus for vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5398039A (en) * 1992-02-10 1995-03-14 Yazaki Corporation Displaying apparatus for vehicle

Similar Documents

Publication Publication Date Title
JPH0281226A (en) Calculation processor
CN111966473A (en) Operation method and device of linear regression task and electronic equipment
US7941473B2 (en) Calculation apparatus and storage medium in which calculation program is stored
JPH04291685A (en) Clip tester circuit and clip testing method
JPS5825287B2 (en) Niyuuriyokuhoushiki
JP3029812B2 (en) Operation error recovery method and apparatus, and computer-readable recording medium storing a program for causing a computer to execute the method
JPS63186329A (en) Pre-processor for trigonometric function
JP2849189B2 (en) Exception handling system
JPH01282633A (en) Non-normalized number processing system
JP3091116B2 (en) XY coordinate display method
US20060064446A1 (en) Calculator with error notification function and its method
JP3293768B2 (en) Floating point arithmetic circuit and computer provided with the floating point arithmetic circuit
JPH02202667A (en) Table calculation totaling method in electronic computer
JP2605664B2 (en) Small electronic calculator
JPH1153318A (en) Desk top electronic calculator
JPH04266157A (en) Salary calculation checking method
JP2002032215A (en) Decimal data dividing method and its program recording medium
JPS62286154A (en) Information processor
JP2526181Y2 (en) Small electronic calculator
JPH06250975A (en) Input/output processing system in distributed computer system
JPS62260221A (en) Input field controller
JPS62133519A (en) Display device
JPH05224775A (en) Time generating system
JPS58178459A (en) Small-sized electronic computer with unit converting function
JPS59170958A (en) Electronic calculator