JP4193773B2 - Arithmetic control device and program - Google Patents

Arithmetic control device and program Download PDF

Info

Publication number
JP4193773B2
JP4193773B2 JP2004250678A JP2004250678A JP4193773B2 JP 4193773 B2 JP4193773 B2 JP 4193773B2 JP 2004250678 A JP2004250678 A JP 2004250678A JP 2004250678 A JP2004250678 A JP 2004250678A JP 4193773 B2 JP4193773 B2 JP 4193773B2
Authority
JP
Japan
Prior art keywords
calculation
digits
digit
display
input
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.)
Active
Application number
JP2004250678A
Other languages
Japanese (ja)
Other versions
JP2006065789A (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 JP2004250678A priority Critical patent/JP4193773B2/en
Priority to US11/109,888 priority patent/US7716267B2/en
Publication of JP2006065789A publication Critical patent/JP2006065789A/en
Application granted granted Critical
Publication of JP4193773B2 publication Critical patent/JP4193773B2/en
Priority to US12/428,288 priority patent/US8316067B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Calculators And Similar Devices (AREA)

Description

本発明は、演算制御装置及びプログラムに関する。   The present invention relates to an arithmetic control device and a program.

従来より、種々の演算制御装置が存在し、四則演算・累積計算等の演算を高速に実行できるものも知られている。特に、複雑な浮動小数点演算を行わせる必要がある場合に、ユーザーはこの演算制御装置に演算を行わせることが多々ある。浮動小数点演算を行う場合の最も一般的な演算規格としては、ANSI/IEEE754−1958標準(「IEEE754」)がよく知られており、単精度(32ビット)、倍精度(64ビット)、拡張倍精度(96ビット)の3種類で浮動小数点演算を行わせることが可能である。   2. Description of the Related Art Conventionally, there are various arithmetic control devices, and those that can execute arithmetic operations such as four arithmetic operations and cumulative calculations at high speed are also known. In particular, when it is necessary to perform complicated floating-point arithmetic, the user often causes the arithmetic control device to perform arithmetic. The ANSI / IEEE 754-1958 standard (“IEEE 754”) is well known as the most common arithmetic standard for performing floating point arithmetic, and is single precision (32 bits), double precision (64 bits), and extended double. It is possible to perform floating point arithmetic with three types of precision (96 bits).

しかし、これらの精度を用いて浮動小数点演算を行わせる場合に、値の近い数値間での減算等においては、演算桁数の制約により有効桁数が極端に少なくなる所謂「桁落ち」が発生するという問題が生じる。この「桁落ち」を説明するために、減算「1.001233−1」を有効桁数8桁で行わせる場合を考える。 However, when floating-point arithmetic is performed using these precisions, so-called “digit loss” occurs, in which the number of significant digits is extremely reduced due to restrictions on the number of arithmetic digits in subtraction between numerical values that are close to each other. Problem arises. In order to explain this “digit loss”, a case where subtraction “1.00123 3 −1” is performed with 8 significant digits is considered.

先ず「1.001233」は、有効桁数8桁では「1.0036945」と求められる。よって、この値を用いると、演算結果は「1.0036945−1=0.0036945」となり、有効桁数が8桁から5桁に減少する。つまり、この例では3桁の桁落ちが発生したことになる。 First "1.00123 3" is determined as "1.0036945" a valid digit number 8 digits. Therefore, when this value is used, the calculation result is “1.00036945-1 = 0.0036945”, and the number of significant digits is reduced from 8 digits to 5 digits. That is, in this example, a 3-digit drop has occurred.

通常、演算制御装置においては、減算等で演算結果の最上位桁の値が「0」となった場合に、ビットのシフトを行うことでこれを「0」以外の値にする正規化処理を行うことが一般的であり、上記の例においては演算結果を「3.6945000 e−3」として表現する場合が多い。このため、従来の演算システムでは、この正規化処理のために演算処理が遅延してしまうという問題があった。   Usually, in the arithmetic and control unit, when the value of the most significant digit of the operation result becomes “0” by subtraction or the like, a normalization process is performed to shift this to a value other than “0” by performing bit shift. This is generally performed, and in the above examples, the calculation result is often expressed as “3.66945000 e-3”. For this reason, the conventional arithmetic system has a problem that the arithmetic processing is delayed due to the normalization processing.

そこで、減算等の演算を実行する前に桁落ちを予測することにより、遅延無く正規化処理を行い、演算処理を高速化する演算制御装置がいろいろと考案されている(例えば、特許文献1。)。
特開2000−322238号公報
Accordingly, various arithmetic control devices have been devised that perform normalization processing without delay by predicting a digit loss before performing arithmetic operations such as subtraction, thereby speeding up the arithmetic processing (for example, Patent Document 1). ).
JP 2000-322238 A

しかし、特許文献1の演算制御装置は、桁落ちを予め予測することで遅延無く正規化処理を行い演算処理を高速化しているが、演算により求められた演算結果の正確な桁落ち桁数を検出するものではないため、誤った桁落ち予測が行われる場合もあり得る。また、桁落ちを予測した場合に、その桁落ちの発生を予測したことを知らしめる手段を具備していないために、ユーザーは求められた演算結果が、桁落ちが発生すると予測されて演算された結果なのかどうかを知ることができなかった。また、そもそも桁落ちを予測するものであるため、正確な桁落ち桁数や正確な有効桁数を知らせることはできなかった。   However, the arithmetic and control apparatus of Patent Document 1 performs normalization processing without delay by predicting a digit loss in advance, thereby speeding up the arithmetic processing. However, an accurate digit number of the arithmetic result obtained by the operation is calculated. Since it is not detected, an incorrect digit loss prediction may be performed. In addition, when a digit loss is predicted, since there is no means for notifying that the occurrence of the digit loss is predicted, the user is expected to calculate the calculated result and calculate that a digit loss will occur. I could not know if it was a result. In addition, since it is intended to predict a digit loss in the first place, it has not been possible to notify the exact number of digits that have been lost or the number of effective digits.

本発明はこのような課題に鑑みて為されたものであり、その目的とするところは、入力された演算桁数で演算を行い、求められた演算結果の正確な桁落ち桁数を検出し、その桁落ちを知らしめる演算制御装置を実現することである。   The present invention has been made in view of such a problem, and the object of the present invention is to perform an operation with the number of input arithmetic digits and detect the exact number of digits that are lost in the calculated operation result. It is to realize an arithmetic and control unit that informs of the digit loss.

本発明に係る演算制御装置は、演算桁数をユーザー操作に従って入力する演算桁数入力手段と、演算の種類をユーザー操作に従って指定する演算種類指定手段と、この演算種類指定手段により指定された種類の演算を、前記演算桁数入力手段により入力された演算桁数で実行する演算実行手段と、前記演算桁数入力手段により入力された演算桁数に所定の追加桁数を追加した追加演算桁数で演算を再実行する追加演算実行手段と、この追加演算実行手段による演算結果の各桁の値と前記演算実行手段による演算結果の各桁の値とを比較し、値が一致しない桁の数を桁落ち桁数として検出する桁落ち桁数検出手段と、前記桁落ち桁数検出手段により検出された桁落ち桁数と前記演算桁数入力手段により入力された演算桁数との和が、前記追加演算実行手段により演算された追加演算桁数以下である場合に、前記追加演算実行手段による演算結果を、前記演算桁数に丸めて表示する制御を行う表示制御手段と、を備えることを特徴とする。 The arithmetic control device according to the present invention includes an arithmetic digit input means for inputting an arithmetic digit number according to a user operation, an arithmetic type specifying means for specifying an arithmetic type according to the user operation, and a type specified by the arithmetic type specifying means. The calculation execution means for executing the above calculation with the calculation digit number input by the calculation digit number input means, and the additional calculation digit obtained by adding a predetermined additional digit number to the calculation digit number input by the calculation digit number input means Comparing the value of each digit of the calculation result by the additional calculation execution means with the value of each digit of the calculation result by the calculation execution means, A digit number detection unit that detects a number as a digit loss digit, and the sum of the number of digits that are detected by the digit detection unit and the number of digits that are input by the operation digit number input unit The additional performance If execution unit or less additional computation digits calculated by the calculation result by the additional execution unit, characterized in that it comprises a display control means for performing control to display rounded to the number of operation digits .

請求項記載の発明によれば、検出した桁落ち桁数と入力された演算桁数との和が、当該演算桁数に所定の追加桁数を追加した追加演算桁数以下である場合に、当該追加演算桁数で演算を実行して求めた演算結果を、当該演算桁数に丸めて表示することができる。 According to the first aspect of the present invention, when the sum of the detected digit number of digits and the input calculation digit number is equal to or less than the additional calculation digit number obtained by adding a predetermined additional digit number to the calculation digit number. The calculation result obtained by executing the calculation with the additional calculation digits can be displayed rounded to the calculation digits.

以下、図1〜図13を参照して、演算制御装置の一つであるグラフ関数電卓に本発明を適用した場合の2つの実施形態について詳細に説明する。   Hereinafter, with reference to FIGS. 1 to 13, two embodiments when the present invention is applied to a graph scientific calculator which is one of arithmetic control devices will be described in detail.

まず、各実施形態に共通する全体の構成を説明する。
図1は、グラフ関数電卓1の概観図である。同図に示すように、グラフ関数電卓1は、各種操作キーを含むキー群3及びディスプレイ4を備えて構成されている。
First, the overall configuration common to the embodiments will be described.
FIG. 1 is an overview diagram of a graph scientific calculator 1. As shown in the figure, the graph scientific calculator 1 includes a key group 3 including various operation keys and a display 4.

キー群3は、ユーザーがグラフ関数電卓1に数値を入力したり、演算結果の表示を指示するためのキーを備えており、例えば数字キー群3aと、方向キー3bと、EXEキー3cと、桁落ち桁数表示キー3dと、有効精度桁数表示キー3eと、桁数増加表示キー3fと、桁落ち部分識別表示キー3gとを備えている。   The key group 3 includes keys for the user to input a numerical value to the graph scientific calculator 1 and to instruct the display of the calculation result. For example, the numeric key group 3a, the direction key 3b, the EXE key 3c, A digit number display key 3d, an effective precision digit number display key 3e, a digit number increase display key 3f, and a digit loss part identification display key 3g are provided.

数字キー群3aは数字を入力するためのキーである。また方向キー3bは、カーソルを移動させたり、機能を選択したりする場合等に押下されるキーであり、本実施形態においては、上下左右の方向に指示入力可能に構成されている。   The number key group 3a is a key for inputting numbers. The direction key 3b is a key that is pressed when the cursor is moved or a function is selected. In this embodiment, the direction key 3b is configured to be able to input instructions in the vertical and horizontal directions.

EXEキー3cは、グラフ関数電卓1に対し処理の実行、決定を指示するためのキーである。桁落ち桁数表示キー3dは、演算された演算結果の桁落ち桁数を表示する指示を与えるためのキーである。また、有効精度桁数表示キー3eは、有効精度桁数を表示する指示を与えるためのキーである。有効精度桁数とは、演算結果の内、桁落ち桁を除いた有効な精度の桁数であり、ユーザーにより入力された演算桁数と桁落ち桁数との差によって求められる。   The EXE key 3c is a key for instructing the graph scientific calculator 1 to execute and determine processing. The digit reduction digit number display key 3d is a key for giving an instruction to display the digit loss digit of the calculated result. The effective precision digit number display key 3e is a key for giving an instruction to display the effective precision digit number. The number of effective precision digits is the number of digits of effective precision excluding the digit digits in the calculation result, and is obtained by the difference between the number of digits entered by the user and the number of digits digits discarded.

桁数増加表示キー3fは、ユーザーにより入力された演算桁数に、所定の追加桁数を追加した追加演算桁数で演算を行わせた場合の演算結果を表示する指示を与えるためのキーである。桁落ち部分識別表示キー3gは、演算結果の内、桁落ち桁の値とそれ以外の値とを異なる表示形態で識別して表示する指示を与えるためのキーである。   The digit increase display key 3f is a key for giving an instruction to display the calculation result when the calculation is performed with the additional calculation digit number obtained by adding the predetermined additional digit number to the calculation digit number input by the user. is there. The digit part identification display key 3g is a key for giving an instruction to identify and display the digit value and other values of the calculation result in different display forms.

ディスプレイ4は、各種キーの押下に応じたデータやグラフが表示される部分であって、LCD(Liquid Crystal Display)等により構成されており、CPU20から入力される表示信号に基づいて各種表示を行う。   The display 4 is a portion where data and graphs are displayed in response to pressing of various keys, and is configured by an LCD (Liquid Crystal Display) or the like, and performs various displays based on display signals input from the CPU 20. .

図2は、グラフ関数電卓1の構成を示すブロック図である。同図において、グラフ関数電卓1は、CPU(Central Processing Unit)20、入力部30、表示部40、ROM(Read Only Memory)50、RAM(Random Access Memory)60、十進演算器70を備え、各部はバス80で相互にデータ通信可能に接続されて構成されている。   FIG. 2 is a block diagram showing a configuration of the graph scientific calculator 1. In the figure, the graph scientific calculator 1 includes a CPU (Central Processing Unit) 20, an input unit 30, a display unit 40, a ROM (Read Only Memory) 50, a RAM (Random Access Memory) 60, and a decimal arithmetic unit 70. Each unit is configured to be connected to each other via a bus 80 so that data communication is possible.

CPU20は、入力部30を介して入力される指示に基づいて、ROM50から所定のプログラムを読み出して当該プログラムをRAM60に一時格納し、当該プログラムを用いて十進演算器70により演算された演算結果の桁落ち桁数の検出、有効精度桁数の検出等の各種処理を実行した後、その処理結果を表示部40に出力させる。すなわちCPU20は、グラフ関数電卓1の各部を統括的に制御する役割を担っている。   The CPU 20 reads out a predetermined program from the ROM 50 based on an instruction input via the input unit 30, temporarily stores the program in the RAM 60, and a calculation result calculated by the decimal arithmetic unit 70 using the program. After executing various processing such as detection of the number of missing digits and detection of the number of effective precision digits, the processing result is output to the display unit 40. That is, the CPU 20 plays a role of comprehensively controlling each part of the graph scientific calculator 1.

入力部30は、数字キーや方向キー等のキー群を備えた入力装置であり、押下されたキーの信号をCPU20に出力する。この入力部30におけるキー入力により、数値の入力、演算の実行、表示処理実行の指示等の入力手段が実現される。なお、この入力部30は、図1に示すキー群3に対応するが、必ずしもキーである必要はなく、例えばタッチパネルであってもよい。   The input unit 30 is an input device having a key group such as numeric keys and direction keys, and outputs a signal of the pressed key to the CPU 20. By means of key input in the input unit 30, input means such as numerical value input, calculation execution, and display processing execution instruction are realized. The input unit 30 corresponds to the key group 3 shown in FIG. 1, but is not necessarily a key, and may be a touch panel, for example.

表示部40は、CPU20から入力される各種信号に基づいて各種画面を表示するものであり、図1に示すディスプレイ4に対応する。   The display unit 40 displays various screens based on various signals input from the CPU 20, and corresponds to the display 4 shown in FIG.

ROM50は、電源がON状態にされた際にグラフ関数電卓1を初期状態に設定するためのプログラム及びデータの他、後述する各実施形態を実現するためのプログラム等を格納している。ROM50は、第1実施形態ではROM51とし、第2実施形態ではROM53として説明する。   The ROM 50 stores, in addition to a program and data for setting the graph scientific calculator 1 to an initial state when the power is turned on, a program for realizing each embodiment to be described later. The ROM 50 will be described as the ROM 51 in the first embodiment and as the ROM 53 in the second embodiment.

RAM60は、CPU20の作業領域として各種データを一時的に記憶するための記憶領域である。RAM60は、第1実施形態ではRAM61とし、第2実施形態ではRAM63として説明する。   The RAM 60 is a storage area for temporarily storing various data as a work area of the CPU 20. The RAM 60 will be described as the RAM 61 in the first embodiment and as the RAM 63 in the second embodiment.

十進演算器70は、プログラムROM710を備え、機械語プログラムの機械語命令に従った十進演算を実行する演算装置であり、指定された任意の桁数で演算を行うことができる。プログラムROM710には、入力された任意の演算桁数で演算を行うための任意桁数演算プログラム7101と、複数演算種類7103とが格納されている。   The decimal arithmetic unit 70 includes a program ROM 710 and is an arithmetic device that executes a decimal operation according to a machine language instruction of a machine language program, and can perform an operation with an arbitrary number of designated digits. The program ROM 710 stores an arbitrary digit number calculation program 7101 for performing calculation with an arbitrary number of input digits and a plurality of calculation types 7103.

図3は、十進演算器70の回路構成を示すブロック図である。十進演算器70は、プログラムROM710と、プログラムカウンタ712と、ラッチ部714と、命令デコーダ716と、可変パラメータ記憶部720と、セレクタ731〜734と、アドレスカウンタ740を含むアドレス制御回路750と、レジスタ部760と、演算器770と、シフタ780とを備えている。以下、この十進演算器70の構成と機能について説明する。   FIG. 3 is a block diagram showing a circuit configuration of the decimal arithmetic unit 70. The decimal arithmetic unit 70 includes a program ROM 710, a program counter 712, a latch unit 714, an instruction decoder 716, a variable parameter storage unit 720, selectors 731 to 734, an address control circuit 750 including an address counter 740, A register unit 760, an arithmetic unit 770, and a shifter 780 are provided. Hereinafter, the configuration and function of the decimal arithmetic unit 70 will be described.

プログラムROM710に格納されている任意桁数演算プログラム7101及び複数演算種類7103は、ユーザーにより入力された演算桁数及び指定された演算種類に応じて適宜選択され、機械語の命令が1つずつ読み出されてラッチ部714に保持される。   Arbitrary digit calculation program 7101 and multiple calculation types 7103 stored in program ROM 710 are selected as appropriate according to the number of calculation digits input by the user and the specified calculation type, and machine language instructions are read one by one. And is held by the latch portion 714.

ここで、機械語の1つの命令は、命令コードOPと4ビットの拡張命令コードEXTとを持つ命令部及び2ビットのデータFu、Suと4ビットのデータFl、Slとを持つオペランド部で構成される。   Here, one instruction in the machine language includes an instruction part having an instruction code OP and a 4-bit extended instruction code EXT and an operand part having 2-bit data Fu and Su and 4-bit data Fl and Sl. Is done.

レジスタ部760は、それぞれ16ワードで構成される4本のレジスタX、Y、Z、Aを備え、ユーザーにより入力された演算データがBCDコード化され、十進数で4桁毎(16ビットで1ワード)に格納される。   The register unit 760 includes four registers X, Y, Z, and A each consisting of 16 words, and the operation data input by the user is BCD encoded, and every four digits in decimal number (1 in 16 bits). Word).

4本のレジスタX、Y、Z、Aは、オペランド部の2ビットのデータFu、Suで指定することが可能である。また、16個のワードは、図4(a)に示す通り、(1)直接アドレス方式と、(2)間接アドレス方式の2通りの方法で指定することが可能である。オペランド部の4ビットのデータFl、Slで直接ワードを指定する方法が直接アドレス方式、命令部の拡張命令コードEXTで可変パラメータ記憶部720のレジスタW、Vに格納されているデータw、vにアクセスし、この値を用いて間接的にワードを指定する方法が間接アドレス方式であって、どちらの方法によっても演算を行わせたいワードを指定することができる。   The four registers X, Y, Z, and A can be specified by 2-bit data Fu and Su in the operand part. In addition, as shown in FIG. 4A, the 16 words can be specified by two methods: (1) direct address method and (2) indirect address method. A method of directly specifying a word with 4-bit data Fl, S1 in the operand part is a direct address system, and data W, v stored in the registers W, V of the variable parameter storage part 720 with an extended instruction code EXT in the instruction part. A method of accessing and indirectly specifying a word using this value is an indirect addressing method, and a word to be operated can be specified by either method.

また、命令は(1)1ワード命令と、(2)連続ワード命令の2つに分類される。1ワード命令は、直接又は間接アドレス方式によって1つのワードを指定し、当該ワードに対する演算を行わせるための命令である。   Instructions are classified into two types: (1) 1 word instruction and (2) continuous word instruction. The one-word instruction is an instruction for designating one word by a direct or indirect address method and performing an operation on the word.

一方、連続ワード命令は、直接又は間接アドレス方式によって開始ワード及び終了ワードを指定し、開始ワードから終了ワードまでの一連のワードを用いた演算を行わせるための命令である。   On the other hand, the continuous word instruction is an instruction for designating a start word and an end word by a direct or indirect address method and performing an operation using a series of words from the start word to the end word.

尚、間接アドレス方式にはワードを指定するワード指定と、桁を指定する桁指定とがある。ワード指定では、レジスタVに格納されているデータvにアクセスして、この値を用いてワードを指定することができるのに対し、桁指定では、レジスタIに格納されているデータiにアクセスし、この値を用いてワード内の桁を指定することができる。ワード指定では、ワード単位、即ち4桁単位での演算しか行わせることができないが、桁指定では、桁単位つまり任意の演算桁数での演算を行わせることができる。   The indirect addressing method includes a word designation for designating a word and a digit designation for designating a digit. In word designation, data v stored in register V can be accessed and a word can be designated using this value, whereas in digit designation, data i stored in register I is accessed. This value can be used to specify a digit in the word. In word designation, calculation can be performed only in word units, that is, in units of four digits, but in digit designation, calculations can be performed in units of digits, that is, an arbitrary number of calculation digits.

間接/直接アドレス方式の別及び連続ワード/1ワード命令の別は、図4(b)に示す通り、命令の4ビットの拡張命令コードEXTで設定される。拡張命令コードEXTの1ビット目のデータ(EXT[1])は連続ワード/1ワード命令の別を示し、連続ワード命令の場合には「0」、1ワード命令の場合には「1」がそれぞれ設定される。   As shown in FIG. 4B, the indirect / direct address type and the continuous word / 1 word instruction are set by the 4-bit extended instruction code EXT. The first bit data (EXT [1]) of the extended instruction code EXT indicates whether it is a continuous word / 1-word instruction, “0” for a continuous word instruction and “1” for a 1-word instruction. Each is set.

拡張命令コードEXTの2ビット目のデータ(EXT[2])及び3ビット目のデータ(EXT[3])は、間接/直接アドレス方式の別を示し、直接アドレス方式によるワード指定の場合には「00」、間接アドレス方式による桁指定の場合には「01」、間接アドレス方式によるワード指定の場合には「10」がそれぞれ設定される。   The second bit data (EXT [2]) and the third bit data (EXT [3]) of the extended instruction code EXT indicate different types of indirect / direct addressing methods. “01” is set for digit designation by the indirect address method, and “10” is set for word designation by the indirect address method.

また、拡張命令コードEXTの4ビット目のデータ(EXT[4])は間接/直接アドレス方式の別を示し、直接アドレス方式によるワード指定の場合には「0」、間接アドレス方式によるワード指定の場合には「1」がそれぞれ設定される。尚、EXT[4]で、間接アドレス方式による桁指定の設定を行うことはできない。   Further, the fourth bit data (EXT [4]) of the extended instruction code EXT indicates the indirect / direct address system, and is “0” in the case of word designation by the direct address system, and the word designation by the indirect address system. In this case, “1” is set. It should be noted that setting of digit designation by the indirect address method cannot be performed with EXT [4].

次に、命令の意味と動作について具体例を挙げて説明する。
図4(c)は、拡張命令コードEXTが取り得る12種類の値の内、4種類についての命令と、その動作内容を示す図である。同図において、命令部の「ADD」は“加算”を表す命令コードであり、「ADD」に続く4ビットのデータは拡張命令コードEXTを表している。
Next, the meaning and operation of instructions will be described with specific examples.
FIG. 4C is a diagram showing four types of commands and their operation contents among the 12 types of values that the extended instruction code EXT can take. In the figure, “ADD” in the instruction part is an instruction code representing “addition”, and 4-bit data following “ADD” represents an extended instruction code EXT.

(1)拡張命令コードEXT=「0000」
この場合、命令は連続ワード命令であり、直接アドレス方式によるワード指定で実行される。先ず、ラッチ部714には、Fu=「00(X)」、Fl=「1111(15)」、Su=「01(Y)」、Sl=「0100(4)」、OP=「ADD」、EXT=「0000」がラッチされる。
(1) Extended instruction code EXT = "0000"
In this case, the instruction is a continuous word instruction and is executed by word designation by the direct address method. First, the latch unit 714 includes Fu = “00 (X)”, Fl = “1111 (15)”, Su = “01 (Y)”, Sl = “0100 (4)”, OP = “ADD”, EXT = “0000” is latched.

セレクタ731〜734では、EXT=「0000」の各ビットのデータが選択制御信号として入力されると共に、各種データの選択・出力が行われる。この場合、セレクタ731からはFl=「1111」が選択・出力され、セレクタ732からはSl=「0100」が選択・出力される。また、アドレスカウンタ740には、セレクタ732の出力データ即ちSl=「0100」がセットされ、セレクタ733、734からは、アドレスカウンタ740の出力データ即ちSl=「0100」が共に選択・出力される。   In the selectors 731 to 734, data of each bit of EXT = “0000” is input as a selection control signal, and various data is selected and output. In this case, Fl = “1111” is selected and output from the selector 731, and S1 = “0100” is selected and output from the selector 732. Further, the output data of the selector 732, that is, S1 = "0100" is set in the address counter 740, and the output data of the address counter 740, that is, S1 = "0100" is selected and output from the selectors 733 and 734.

これにより、レジスタ部760のアドレス端子FadにはFu=「00」とSl=「0100」とが入力されることで、レジスタXの第4ワードに格納されている演算データが出力端子Foutから出力される。また、アドレス端子SadにはSu=「01」とSl=「0100」とが入力されることで、レジスタYの第4ワードに格納されている演算データが出力端子Soutから出力される。   As a result, Fu = “00” and S1 = “0100” are input to the address terminal Fad of the register unit 760, so that the operation data stored in the fourth word of the register X is output from the output terminal Fout. Is done. Further, when Su = “01” and S1 = “0100” are input to the address terminal Sad, the operation data stored in the fourth word of the register Y is output from the output terminal Sout.

一方、命令デコーダ716では命令コードOPの「ADD」が加算であると解読(デコード)され、加算を指示する演算制御信号が演算器770に出力される。これにより、演算器770では、レジスタ部760から出力された2つの演算データが加算され、その加算結果が入力端子Finに入力され、レジスタXの第4ワードに書き込まれる(動作:X4+Y4→X4)。   On the other hand, the instruction decoder 716 decodes (decodes) that the “ADD” of the instruction code OP is an addition, and outputs an arithmetic control signal instructing the addition to the arithmetic unit 770. Thereby, in the arithmetic unit 770, the two arithmetic data output from the register unit 760 are added, and the addition result is input to the input terminal Fin and written to the fourth word of the register X (operation: X4 + Y4 → X4). .

その後は、アドレスカウンタ740がカウントアップし、アドレス制御回路750により命令終了信号「1」が出力されるまでの間、第4ワードから第15ワードまでの一連のワードを用いた加算が繰り返し実行される(動作:X4〜15+Y4〜15→X4〜15)。これにより、演算桁数48(=4×(15−4+1))桁での加算が実行される。   Thereafter, until the address counter 740 counts up and the instruction control signal “1” is output by the address control circuit 750, addition using a series of words from the fourth word to the fifteenth word is repeatedly executed. (Operation: X4-15 + Y4-15 → X4-15). As a result, addition is performed with 48 (= 4 × (15−4 + 1)) operation digits.

(2)拡張命令コードEXT=「0100」
この場合、命令は連続ワード命令であり、間接アドレス方式による桁指定で実行される。先ず、ラッチ部714には、Fu=「00(X)」、Fl=「1111(15)」、Su=「01(Y)」、Sl=「*」、OP=「ADD」、EXT=「0100」がラッチされる。
(2) Extended instruction code EXT = "0100"
In this case, the instruction is a continuous word instruction and is executed by digit designation by the indirect addressing method. First, the latch unit 714 includes Fu = “00 (X)”, Fl = “1111 (15)”, Su = “01 (Y)”, Sl = “*”, OP = “ADD”, EXT = “ 0100 "is latched.

セレクタ731からはFl=「1111」が選択・出力され、セレクタ732からはデータiが選択・出力される。また、アドレスカウンタ740には、データiがセットされ、セレクタ733、734からは、データiが共に選択・出力される。   Fl = “1111” is selected and output from the selector 731, and data i is selected and output from the selector 732. Further, data i is set in the address counter 740, and both data i are selected and output from the selectors 733 and 734.

これにより、レジスタ部760のアドレス端子FadにはFu=「00」とデータiとが入力されることで、レジスタXの第i桁に格納されている演算データが出力端子Foutから出力される。また、アドレス端子SadにはSu=「01」とデータiとが入力されることで、レジスタYの第i桁に格納されている演算データが出力端子Soutから出力される。   As a result, Fu = “00” and data i are input to the address terminal Fad of the register unit 760, so that the operation data stored in the i-th digit of the register X is output from the output terminal Fout. In addition, when Su = “01” and data i are input to the address terminal Sad, operation data stored in the i-th digit of the register Y is output from the output terminal Sout.

そして、演算器770では、レジスタ部760から出力された2つの演算データが加算され、その加算結果が入力端子Finに入力され、レジスタXの第i桁に書き込まれる(動作:Xi+Yi→Xi)。   Then, in the arithmetic unit 770, the two arithmetic data output from the register unit 760 are added, and the addition result is input to the input terminal Fin and written in the i-th digit of the register X (operation: Xi + Yi → Xi).

その後は、アドレスカウンタ740がカウントアップし、アドレス制御回路750により命令終了信号「1」が出力されるまでの間、第i桁から第15ワードまでの加算が繰り返し実行される(動作:Xi〜15+Yi〜15→Xi〜15)。iの値が可変であることから、iを変化させることで任意の演算桁数での演算が可能となる。   Thereafter, the addition from the i-th digit to the 15th word is repeatedly executed until the address counter 740 counts up and the instruction end signal “1” is output by the address control circuit 750 (operation: Xi˜ 15 + Yi-15 → Xi-15). Since the value of i is variable, calculation with an arbitrary number of calculation digits is possible by changing i.

(3)拡張命令コードEXT=「0001」
この場合、命令は1ワード命令であり、直接アドレス方式によるワード指定で実行される。先ず、ラッチ部714には、Fu=「00(X)」、Fl=「1111(15)」、Su=「01(Y)」、Sl=「0100(4)」、OP=「ADD」、EXT=「0001」がラッチされる。
(3) Extended instruction code EXT = “0001”
In this case, the instruction is a one-word instruction and is executed by word designation by the direct address method. First, the latch unit 714 includes Fu = “00 (X)”, Fl = “1111 (15)”, Su = “01 (Y)”, Sl = “0100 (4)”, OP = “ADD”, EXT = “0001” is latched.

セレクタ731からはFl=「1111」が選択・出力され、セレクタ732からはSl=「0100」が選択・出力される。また、アドレスカウンタ740にはSl=「0100」がセットされ、セレクタ733からはFl=「1111」、セレクタ734からはSl=「0100」がそれぞれ選択・出力される。   The selector 731 selects and outputs Fl = “1111”, and the selector 732 selects and outputs S1 = “0100”. In addition, Sl = “0100” is set in the address counter 740, Fl = “1111” is selected from the selector 733, and S1 = “0100” is selected and output from the selector 734.

これにより、レジスタ部760のアドレス端子FadにはFu=「00」とFl=「1111」とが入力されることで、レジスタXの第15ワードに格納されている演算データが出力端子Foutから出力される。また、アドレス端子SadにはSu=「01」とSl=「0100」とが入力されることで、レジスタYの第4ワードに格納されている演算データが出力端子Soutから出力される。   As a result, Fu = “00” and Fl = “1111” are input to the address terminal Fad of the register unit 760, so that the operation data stored in the 15th word of the register X is output from the output terminal Fout. Is done. Further, when Su = “01” and S1 = “0100” are input to the address terminal Sad, the operation data stored in the fourth word of the register Y is output from the output terminal Sout.

そして、演算器770では、レジスタ部760から出力された2つの演算データが加算され、その加算結果が入力端子Finに入力され、レジスタXの第15ワードに書き込まれる(動作:X15+Y4→X15)。   Then, in the arithmetic unit 770, the two arithmetic data output from the register unit 760 are added, and the addition result is input to the input terminal Fin and written into the fifteenth word of the register X (operation: X15 + Y4 → X15).

一方、EXT[1]が1であることから、アドレス制御回路750からは必ず命令終了信号「1」が出力され、命令の実行が終了する。これにより、レジスタXの第15ワードの演算データと、レジスタYの第4ワードの演算データとが加算され、演算桁数4桁での演算が実行される。   On the other hand, since EXT [1] is 1, the instruction end signal “1” is always output from the address control circuit 750, and the execution of the instruction is ended. As a result, the operation data of the 15th word of the register X and the operation data of the fourth word of the register Y are added, and the operation with 4 operation digits is executed.

(4)拡張命令コードEXT=「1101」
この場合、命令は1ワード命令であり、間接アドレス方式による桁指定で実行される。先ず、ラッチ部714には、Fu=「00(X)」、Fl=「*」、Su=「01(Y)」、Sl=「*」、OP=「ADD」、EXT=「1101」がラッチされる。
(4) Extended instruction code EXT = "1101"
In this case, the instruction is a one-word instruction and is executed by specifying a digit by the indirect address method. First, Fu = “00 (X)”, Fl = “*”, Su = “01 (Y)”, Sl = “*”, OP = “ADD”, EXT = “1101” are stored in the latch unit 714. Latched.

セレクタ731からはデータwが選択・出力され、セレクタ732からはデータiが選択・出力される。また、アドレスカウンタ740にはデータiがセットされ、セレクタ733からはデータw、セレクタ734からはデータiがそれぞれ選択・出力される。   The selector 731 selects and outputs data w, and the selector 732 selects and outputs data i. Further, data i is set in the address counter 740, data w is selected from the selector 733, and data i is selected and output from the selector 734, respectively.

これにより、レジスタ部760のアドレス端子FadにはFu=「00」とデータwとが入力されることで、レジスタXの第wワードに格納されている演算データが出力端子Foutから出力される。また、アドレス端子SadにはSu=「01」とデータiとが入力されることで、レジスタYの第i桁に格納されている演算データが出力端子Soutから出力される。   As a result, Fu = “00” and data w are input to the address terminal Fad of the register unit 760, so that the operation data stored in the wth word of the register X is output from the output terminal Fout. In addition, when Su = “01” and data i are input to the address terminal Sad, operation data stored in the i-th digit of the register Y is output from the output terminal Sout.

そして、演算器770では、レジスタ部760から出力された2つの演算データが加算され、その加算結果が入力端子Finに入力され、レジスタXの第wワードに書き込まれる(動作:Xw+Yi→Xw)。   Then, in the arithmetic unit 770, the two arithmetic data output from the register unit 760 are added, and the addition result is input to the input terminal Fin and written to the w-th word of the register X (operation: Xw + Yi → Xw).

一方、EXT[1]が1であることから、アドレス制御回路750からは必ず命令終了信号「1」が出力され、命令の実行が終了する。これにより、レジスタXの第wワードの演算データと、レジスタYの第i桁の演算データとが加算される。   On the other hand, since EXT [1] is 1, the instruction end signal “1” is always output from the address control circuit 750, and the execution of the instruction is ended. Thereby, the operation data of the w-th word of the register X and the operation data of the i-th digit of the register Y are added.

以上、4種類の命令のみを例に挙げて十進演算器70の動作について説明したが、選択される機械語プログラム及び命令の種類により任意の演算桁数での演算を行うことが可能となる。   The operation of the decimal arithmetic unit 70 has been described above by taking only four types of instructions as an example. However, it is possible to perform calculations with an arbitrary number of arithmetic digits depending on the machine language program selected and the type of instruction. .

〔第1実施形態〕
図5〜10を参照して、第1実施形態について説明する。
[First Embodiment]
The first embodiment will be described with reference to FIGS.

まず、構成を説明する。
図5(a)は、第1実施形態に係るグラフ関数電卓1が図2のROM50の代わりに備えるROM51の構成を示す図である。ROM51は、CPU20によって読み出され、第1演算表示処理(図6参照)として実行される第1演算表示プログラム511を格納している。
First, the configuration will be described.
FIG. 5A is a diagram showing a configuration of a ROM 51 provided in the graph scientific calculator 1 according to the first embodiment in place of the ROM 50 of FIG. The ROM 51 stores a first calculation display program 511 that is read by the CPU 20 and executed as a first calculation display process (see FIG. 6).

第1演算表示処理とは、入力された演算桁数及び指定された演算種類に応じて演算を実行すると共に、演算により求められた演算結果の桁落ち桁数及び有効精度桁数を検出し、当該演算結果と共に、各種表示指示に応じて桁落ちを知らしめる表示を行う処理である。尚、この第1演算表示処理の動作については詳細に後述する。   The first calculation display processing is to perform calculation according to the input calculation digit number and the specified calculation type, and to detect the number of lost digits and the effective precision digit of the calculation result obtained by the calculation, This is a process of performing display for notifying a digit loss in accordance with various display instructions together with the calculation result. The operation of the first calculation display process will be described later in detail.

図5(b)は、第1実施形態に係るグラフ関数電卓1が図2のRAM60の代わりに備えるRAM61の構成を示す図である。RAM61は、入力された演算桁数を格納するための演算桁数格納領域611と、指定された演算種類を格納するための演算種類格納領域613と、入力された被演算子を格納するための被演算子格納領域615と、演算による桁落ち桁数を格納するための桁落ち桁数格納領域617と、演算結果の有効精度桁数を格納するための有効精度桁数格納領域619とを備えている。ここで、演算桁数とは演算を行わせる桁数のことを指し、演算種類とは演算の対象となる関数の種類のことを指す。   FIG. 5B is a diagram illustrating a configuration of a RAM 61 provided in the graph scientific calculator 1 according to the first embodiment in place of the RAM 60 in FIG. 2. The RAM 61 stores an operation digit number storage area 611 for storing the input operation digit number, an operation type storage area 613 for storing the specified operation type, and an input operand. There is provided an operand storage area 615, a digit loss digit storage area 617 for storing the number of digits discarded by the calculation, and an effective precision digit number storage area 619 for storing the effective precision digit number of the calculation result. ing. Here, the number of digits of calculation refers to the number of digits to be calculated, and the type of calculation refers to the type of function to be calculated.

次に動作を説明する。
図6は、CPU20により第1演算表示プログラム511が読み出されて実行されることによりグラフ関数電卓1において実行される第1演算表示処理の流れを示すフローチャートである。
Next, the operation will be described.
FIG. 6 is a flowchart showing the flow of the first calculation display process executed in the graph scientific calculator 1 by reading and executing the first calculation display program 511 by the CPU 20.

先ず、ユーザーにより演算桁数が入力部30を介して入力されると(ステップA1)、CPU20は、この入力された演算桁数を演算桁数格納領域611に格納し、続いて演算種類がユーザーにより指定されると(ステップA3)、この指定された演算種類を演算種類格納領域613に格納する。また、ユーザーにより被演算子が入力されると(ステップA5)、CPU20は、この入力された被演算子を被演算子格納領域615に格納する。   First, when the calculation digit number is input by the user via the input unit 30 (step A1), the CPU 20 stores the input calculation digit number in the calculation digit number storage area 611, and then the calculation type is the user. Is designated (step A3), the designated computation type is stored in the computation type storage area 613. When the user inputs an operand (step A5), the CPU 20 stores the input operand in the operand storage area 615.

次に、CPU20は、入力された被演算子を用い、指定された演算種類の演算を入力された演算桁数で実行するための機械語プログラムを生成し、十進演算器70に演算(以下、「第1演算」と呼ぶ。)を実行させる(ステップA7)。また、指定された演算種類の演算を入力された演算桁数に所定の追加桁数(例えば、「4桁」)を追加した追加演算桁数で実行するための機械語プログラムを生成し、十進演算器70に演算(以下、「第2演算」と呼ぶ。)を実行させる(ステップA9)。   Next, the CPU 20 uses the input operand to generate a machine language program for executing an operation of the specified operation type with the input operation digit number, and performs an operation (hereinafter referred to as a decimal operation unit 70). , Referred to as “first calculation”) (step A7). In addition, a machine language program is generated to execute an operation of the specified operation type with an additional operation digit number obtained by adding a predetermined additional number of digits (for example, “4 digits”) to the input operation digit number. The arithmetic operation unit 70 is caused to execute an operation (hereinafter referred to as “second operation”) (step A9).

次いで、CPU20は、第1演算及び第2演算で求められた演算結果(以下、それぞれ「第1演算結果」、「第2演算結果」と呼ぶ。)の最上位桁の値を0以外の値にする正規化処理を行う(ステップA11)。   Next, the CPU 20 sets the value of the most significant digit of the calculation results obtained by the first calculation and the second calculation (hereinafter referred to as “first calculation result” and “second calculation result” respectively) to a value other than 0. Normalization processing is performed (step A11).

次に、CPU20は、第1演算結果と第2演算結果の各桁の値を比較し、値が一致しない桁の数を桁落ち桁数として検出して(ステップA13)、桁落ち桁数格納領域617に格納する。また、CPU20は、検出した桁落ち桁数を用いて有効精度桁数を検出し(ステップA15)、有効精度桁数格納領域619に格納する。ここで、有効精度桁数とは、第1演算結果の内、桁落ち桁を除いた有効な精度の桁数であり、入力された演算桁数と桁落ち桁数との差として検出される。   Next, the CPU 20 compares the value of each digit of the first calculation result and the second calculation result, detects the number of digits whose values do not match as the number of digits discarded (step A13), and stores the number of digits discarded. Store in area 617. Further, the CPU 20 detects the effective precision digit number by using the detected number of discarded digits (step A15) and stores it in the effective precision digit number storage area 619. Here, the number of effective precision digits is the number of digits of effective precision excluding the digit digits in the first calculation result, and is detected as the difference between the number of digits entered and the number of digits discarded. .

次いで、CPU20は、第1演算結果を表示部40に表示させる(ステップA17)。そして、CPU20は、桁落ち桁数表示キー3dが押下されたかどうかを判定することで桁落ち桁数表示指示がなされたか否かを判定し(ステップA19)、なされたと判定した場合には(ステップA19;Yes)、ステップA13で検出した桁落ち桁数を表示部40に表示させる(ステップA21)。また、指示がなされなかったと判定した場合には(ステップA19;No)、ステップA23に処理を移行する。   Next, the CPU 20 displays the first calculation result on the display unit 40 (step A17). Then, the CPU 20 determines whether or not an instruction for displaying the number of digits to be discarded has been issued by determining whether or not the digit number display key 3d has been pressed (step A19). (A19; Yes), the number of digits discarded in step A13 is displayed on the display unit 40 (step A21). If it is determined that no instruction has been given (step A19; No), the process proceeds to step A23.

そして、CPU20は、有効精度桁数表示キー3eが押下されたかどうかを判定することで有効精度桁数表示指示がなされたか否かを判定し(ステップA23)、なされたと判定した場合には(ステップA23;Yes)、ステップA15で検出した有効精度桁数を表示部40に表示させ(ステップA25)、なされなかったと判定した場合には(ステップA23;No)、ステップA27へ処理を移行する。   Then, the CPU 20 determines whether or not an effective precision digit number display key 3e has been pressed by determining whether or not the effective precision digit number display key 3e has been pressed (step A23). (A23; Yes), the number of effective precision digits detected in step A15 is displayed on the display unit 40 (step A25). If it is determined that it has not been made (step A23; No), the process proceeds to step A27.

次いで、CPU20は、桁数増加表示キー3fが押下されたかどうかを判定することで桁数増加表示指示がなされたか否かを判定し(ステップA27)、なされたと判定した場合には(ステップA27;Yes)、第2演算結果を表示部40に表示させ(ステップA29)、なされなかったと判定した場合には(ステップA27;No)、ステップA31に処理を移行する。   Next, the CPU 20 determines whether or not an instruction for increasing the number of digits has been issued by determining whether or not the digit number increasing display key 3f has been pressed (step A27). If it is determined that it has been made (step A27; Yes) The second calculation result is displayed on the display unit 40 (step A29). If it is determined that the second calculation result has not been made (step A27; No), the process proceeds to step A31.

そして、CPU20は、桁落ち部分識別表示キー3gが押下されたかどうかを判定することで桁落ち部分識別表示指示がなされたか否かを判定し(ステップA31)、なされたと判定した場合には(ステップA31;Yes)、第1演算結果の桁落ち桁の値とそれ以外の値とを、異なる表示形態で識別して表示部に表示させ(ステップA33)、第1演算表示処理を終了する。   Then, the CPU 20 determines whether or not a digit part identification display key 3g has been pressed to determine whether or not a digit part identification display instruction has been issued (step A31). (A31; Yes), the digit value of the first calculation result and other values are identified by different display forms and displayed on the display unit (step A33), and the first calculation display process is terminated.

また、ステップA31において桁落ち部分識別表示指示がなされなかったと判定した場合には(ステップA31;No)、CPU20は、第1演算表示処理を終了する。   On the other hand, when it is determined in step A31 that no digit part identification display instruction has been given (step A31; No), the CPU 20 ends the first calculation display process.

次に、これまでの処理について、表示画面例を参照しつつ、具体的に説明する。
図7(a)は、グラフ関数電卓1の表示部40に表示される表示画面の一例である表示画面401を示したものである。
Next, the processing so far will be specifically described with reference to a display screen example.
FIG. 7A shows a display screen 401 which is an example of a display screen displayed on the display unit 40 of the graph scientific calculator 1.

表示画面401の上部には、ユーザーが演算桁数を入力するための演算桁数入力ボックス4011と、演算種類を指定するための演算種類指定ボックス4013と、被演算子を入力するための被演算子入力ボックス4015とが表示されている。尚、演算種類は、プルダウンメニューから選択・指定することが可能である。   In the upper part of the display screen 401, a calculation digit number input box 4011 for the user to input the calculation digit number, a calculation type specification box 4013 for specifying the calculation type, and a calculation target for inputting the operand A child input box 4015 is displayed. Note that the calculation type can be selected and designated from a pull-down menu.

そして、表示画面401の下部には、第1演算結果が表示される演算結果表示ボックス4017と、第2演算結果が表示される桁数増加表示ボックス4019と、桁落ち桁数が表示される桁落ち桁数表示ボックス4021と、有効精度桁数が表示される有効精度桁数表示ボックス4023とが表示されている。   At the bottom of the display screen 401, a calculation result display box 4017 for displaying the first calculation result, a digit number increasing display box 4019 for displaying the second calculation result, and a digit for displaying the number of digits to be discarded. A drop digit display box 4021 and an effective precision digit display box 4023 in which the effective precision digits are displayed are displayed.

また、表示画面401の最下部には、4種類の表示指示4025が表示されており、どの表示指示がなされたかがユーザーに一目でわかるようになっている。例えば、桁落ち桁数表示キー3dが押下されることで桁落ち桁数表示指示がなされた場合には、表示指示4025の内、「桁落ち桁数」と表示された部分が反転表示される。   In addition, four types of display instructions 4025 are displayed at the bottom of the display screen 401 so that the user can see at a glance which display instruction has been made. For example, when an instruction for displaying the number of digits to be discarded is issued by pressing the digit number display key 3d, a portion of the display instruction 4025 that is displayed as “number of digits to be discarded” is highlighted. .

図7(b)は、プルダウンメニューから演算種類が指定された場合の表示画面401を示したものである。演算種類指定ボックス4013のプルダウンメニューには、「x2」、「logx」・・・と複数の演算種類が表示されており、ここでは、複利計算の一種であり4013aで示される「(1+x)3−1」が指定され、反転表示されている。 FIG. 7B shows a display screen 401 when an operation type is designated from the pull-down menu. In the pull-down menu of the calculation type designation box 4013, a plurality of calculation types such as “x 2 ”, “logx”... Are displayed. Here, “(1 + x)” is a kind of compound interest calculation and is indicated by 4013a. “ 3 −1” is designated and highlighted.

図8(a)は、ユーザーにより演算桁数の入力、演算種類の指定及び被演算子の入力がなされた場合の表示画面401を示したものである。演算桁数入力ボックスには、演算桁数として4011aで示される「8」が入力され(図6のステップA1)、演算種類指定ボックスでは、演算種類として4013aで示される「(1+x)3−1」が指定されている(図6のステップA3)。また、被演算子入力ボックスには、被演算子(ここでは、変数xに代入される数値。)として4015aで示される「0.00123」が入力されている(図6のステップA5)。 FIG. 8A shows a display screen 401 when the user inputs the number of operation digits, specifies the operation type, and inputs the operand. In the operation digit number input box, “8” indicated by 4011a is input as the operation digit number (step A1 in FIG. 6), and “(1 + x) 3 −1 indicated by 4013a as the operation type in the operation type designation box. "Is designated (step A3 in FIG. 6). In the operand input box, “0.00123” indicated by 4015a is input as the operand (here, a numerical value assigned to the variable x) (step A5 in FIG. 6).

図8(b)は、第1演算結果が表示された場合の表示画面401を示したものである。演算結果表示ボックスには、第1演算結果として4017aで示される「3.6945000 e−3」が表示されている(図6のステップA17)。尚、表示された第1演算結果の内、「3.6945000」は仮数部、「e−3」は指数部をそれぞれ表している。   FIG. 8B shows a display screen 401 when the first calculation result is displayed. In the calculation result display box, “3.6695000 e-3” indicated by 4017a is displayed as the first calculation result (step A17 in FIG. 6). Of the displayed first calculation results, “3.6945000” represents the mantissa part and “e-3” represents the exponent part.

図9(a)は、桁落ち桁数表示指示がユーザーによりなされた場合の表示画面401を示したものである。桁落ち桁数表示指示がなされたことで(図6のステップA19;Yes)、表示画面401最下部の「桁落ち桁数」が4025aとして反転表示され、桁落ち桁数表示ボックスには、桁落ち桁数として4021aで示される「3」が表示されている(図6のステップA21)。これにより、表示された第1演算結果には、3桁の桁落ちが生じていることがわかる。   FIG. 9A shows a display screen 401 when an instruction to display the number of digits is given by the user. When an instruction for displaying the number of digits to be discarded is given (step A19 in FIG. 6; Yes), the “number of digits to be discarded” at the bottom of the display screen 401 is highlighted as 4025a. “3” indicated by 4021a is displayed as the number of digits to be dropped (step A21 in FIG. 6). Thereby, it can be seen that the displayed first calculation result has a 3-digit drop.

図9(b)は、有効精度桁数表示指示がユーザーによりなされた場合の表示画面401を示したものである。有効精度桁数表示指示がなされたことで(図6のステップA23;Yes)、表示画面401最下部の「有効精度」が4025bとして反転表示され、有効精度桁数表示ボックスには、有効精度桁数として4023aで示される「5」が表示されている(図6のステップA25)。これにより、表示された第1演算結果の有効精度桁数は5桁であることがわかる。   FIG. 9B shows the display screen 401 when the effective precision digit number display instruction is given by the user. When an instruction to display the effective precision digits is given (step A23 in FIG. 6; Yes), the “effective precision” at the bottom of the display screen 401 is highlighted as 4025b, and the effective precision digits display box displays the effective precision digits. “5” indicated by the number 4023a is displayed (step A25 in FIG. 6). Thereby, it can be seen that the number of effective precision digits of the displayed first calculation result is 5 digits.

図10(a)は、桁数増加表示指示がユーザーによりなされた場合の表示画面401を示したものである。桁数増加表示指示がなされたことで(図6のステップA27;Yes)、表示画面401最下部の「桁増加表示」が4025cとして反転表示され、桁数増加表示ボックスには、第2演算結果として4019aで示される「3.69454056000 e−3」が表示されている(図6のステップA29)。つまり、第2演算は、入力された演算桁数8桁に追加桁数として4桁を追加した追加演算桁数12桁で実行された(図6のステップA9)ことがわかる。また、第1演算結果である4017aと第2演算結果である4019aとを比較すると、第1演算結果の下位3桁の値が、第2演算結果の対応する各桁の値と一致していないため、ユーザーは第1演算結果の下位3桁に桁落ちが生じていることを理解できる。また、追加演算桁数での演算結果により、より高精度な演算結果が得られる。   FIG. 10A shows a display screen 401 when the user has issued an instruction to increase the number of digits. When an instruction to increase the number of digits is issued (step A27 in FIG. 6; Yes), “digit increase display” at the bottom of the display screen 401 is highlighted as 4025c, and the second calculation result is displayed in the digit increase display box. "3.66944056000 e-3" indicated by 4019a is displayed (step A29 in FIG. 6). That is, it can be seen that the second calculation was executed with 12 additional calculation digits obtained by adding 4 digits as the additional digits to the input 8 calculation digits (step A9 in FIG. 6). Further, when comparing 4017a which is the first calculation result and 4019a which is the second calculation result, the value of the lower three digits of the first calculation result does not match the value of each corresponding digit of the second calculation result. Therefore, the user can understand that a digit loss has occurred in the lower three digits of the first calculation result. Further, a calculation result with higher accuracy can be obtained by the calculation result with the additional calculation digits.

図10(b)は、桁落ち部分識別表示指示がユーザーによりなされた場合の表示画面401を示したものである。桁落ち部分識別表示指示がなされたことで(図6のステップA33;Yes)、表示画面401最下部の「識別表示」が4025dとして反転表示され、演算結果表示ボックスには、第1演算結果の内、桁落ち部分である下位3桁の「0」が小文字4017bで識別されて表示されている(図6のステップA35)。これにより、表示された第1演算結果の下位3桁に桁落ちが生じていることが一目で視認できる。   FIG. 10 (b) shows a display screen 401 when an instruction for identifying the digit portion is displayed by the user. As a result of the digit part identification display instruction (step A33 in FIG. 6; Yes), the “identification display” at the bottom of the display screen 401 is highlighted as 4025d, and the calculation result display box displays the first calculation result. Among them, the lower three digits “0”, which is a missing part, are identified and displayed by the lower case 4017b (step A35 in FIG. 6). Thereby, it can be visually recognized that a digit loss has occurred in the lower three digits of the displayed first calculation result.

以上の通りに、第1実施形態によれば、入力された演算桁数及び指定された演算種類に応じて演算を実行し、求められた演算結果の桁落ち桁数及び有効精度桁数を検出することで、桁落ちを知らしめる表示を行うことができる。このため、入力された演算桁数で演算を行い、求められた演算結果の正確な桁落ち桁数を検出し、桁落ちを知らしめることを可能にする演算制御装置が実現できる。   As described above, according to the first embodiment, the calculation is executed according to the input calculation digit number and the specified calculation type, and the number of lost digits and the effective precision digit of the obtained calculation result are detected. By doing so, it is possible to perform a display informing that the digits are lost. For this reason, it is possible to realize an arithmetic and control unit that performs an operation with the input number of arithmetic digits, detects the exact number of digits that are lost in the calculated result, and makes it possible to notify the user that the digits are lost.

〔変形例〕
尚、ステップA33の桁落ち部分識別表示において、桁落ち部分の値を小文字で識別することとして説明したが、識別方法はこれに限られるわけではない。例えば、桁落ち部分の値を細字で表示し、それ以外の値を太字で表示するといった、線の太さで識別することにしてもよいし、桁落ち部分の値を赤字で表示し、それ以外の部分を黒字で表示するといった、色で識別することにしても勿論よい。
[Modification]
In addition, in the digit part identification display of step A33, it demonstrated as identifying the value of a digit part by a small letter, However, The identification method is not necessarily restricted to this. For example, it may be possible to identify by the thickness of the line, such as displaying the value of the omitted part in thin characters and displaying the other values in bold, or displaying the value of the omitted part in red. Of course, other parts may be identified by color, such as displaying in black.

また、4種類の表示指示はそれぞれ独立しており、表示も個々になされるものとして説明したが、所望の表示指示が複数同時に与えられた場合に、表示を同時に行うことにしても勿論よい。例えば、桁落ち桁数表示指示と桁数増加表示指示とが同時に行われた場合に、桁落ち桁数と第2演算結果とを同時に表示することで、ユーザーは桁落ちの存在をより把握しやすくなる。   In addition, the four types of display instructions are independent of each other, and the display is performed individually. However, when a plurality of desired display instructions are given at the same time, the display may be performed simultaneously. For example, when an instruction to display the number of digits dropped and an instruction to increase the number of digits are issued at the same time, by displaying the number of digits discarded and the result of the second calculation at the same time, the user can better understand the presence of digits. It becomes easy.

〔第2実施形態〕
図11〜13を参照して、第2実施形態について説明する。
[Second Embodiment]
The second embodiment will be described with reference to FIGS.

まず、構成を説明する。
図11(a)は、第2実施形態に係るグラフ関数電卓1が図2のROM50の代わりに備えるROM53の構成を示す図である。ROM53は、CPU20によって読み出され、第2演算表示処理(図12参照)として実行される第2演算表示プログラム531を格納している。
First, the configuration will be described.
FIG. 11A is a diagram showing a configuration of a ROM 53 provided in the graph scientific calculator 1 according to the second embodiment in place of the ROM 50 of FIG. The ROM 53 stores a second calculation display program 531 that is read by the CPU 20 and executed as a second calculation display process (see FIG. 12).

第2演算表示処理とは、入力された演算桁数及び指定された演算種類に応じた演算を実行し、求められた演算結果の桁落ち桁数を検出すると共に、桁落ち桁の補正を施した演算結果を表示させる処理である。尚、この第2演算表示処理の動作については詳細に後述する。   The second calculation display process executes the calculation according to the number of input calculation digits and the specified calculation type, detects the number of digits that are lost in the calculated result, and corrects the digits. This is a process for displaying the calculated result. The operation of the second calculation display process will be described later in detail.

図11(b)は、第2実施形態に係るグラフ関数電卓1が図2のRAM60の代わりに備えるRAM63の構成を示す図である。RAM63は、ユーザーにより入力された演算桁数を格納するための演算桁数格納領域631と、指定された演算種類を格納するための演算種類格納領域633と、入力された被演算子を格納するための被演算子格納領域635と、演算結果の桁落ち桁数を格納するための桁落ち桁数格納領域637とを備えている。尚、演算桁数及び演算種類については第1実施形態と同様である。   FIG. 11B is a diagram illustrating a configuration of a RAM 63 provided in the graph scientific calculator 1 according to the second embodiment in place of the RAM 60 of FIG. The RAM 63 stores an operation digit number storage area 631 for storing the operation digit number input by the user, an operation type storage area 633 for storing the specified operation type, and the input operand. An operand storage area 635 for storing the result, and a digit storage area 637 for storing the number of digits discarded as the result of the operation. The number of calculation digits and the calculation type are the same as in the first embodiment.

次に動作を説明する。
図12は、CPU20により第2演算表示プログラム531が読み出されて実行されることによりグラフ関数電卓1において実行される第2演算表示処理の流れを示すフローチャートである。
Next, the operation will be described.
FIG. 12 is a flowchart showing the flow of the second calculation display process executed in the graph scientific calculator 1 when the second calculation display program 531 is read and executed by the CPU 20.

先ず、ユーザーにより演算桁数が入力部30を介して入力されると(ステップB1)、CPU20は、この入力された演算桁数を演算桁数格納領域631に格納し、続いて演算種類がユーザーにより指定されると(ステップB3)、この指定された演算種類を演算種類格納領域633に格納する。また、ユーザーにより被演算子が入力されると(ステップB5)、CPU20は、この入力された被演算子を被演算子格納領域635に格納する。   First, when the calculation digit number is input by the user via the input unit 30 (step B1), the CPU 20 stores the input calculation digit number in the calculation digit number storage area 631, and then the calculation type is the user. Is designated (step B3), the designated computation type is stored in the computation type storage area 633. When the operand is input by the user (step B5), the CPU 20 stores the input operand in the operand storage area 635.

次に、CPU20は、入力された被演算子を用い、指定された演算種類の演算を入力された演算桁数で実行するための機械語プログラムを生成し、十進演算器70に演算(第1演算)を実行させる(ステップB7)。また、入力された演算桁数に所定の追加桁数(例えば、「4桁」)を追加した追加演算桁数で、指定された演算種類の演算を実行するための機械語プログラムを生成し、十進演算器70にその演算(第2演算)を実行させる(ステップB9)。   Next, the CPU 20 uses the input operand to generate a machine language program for executing an operation of the specified operation type with the input operation digit number, and performs an operation (first operation) on the decimal arithmetic unit 70. 1 calculation) is executed (step B7). Further, a machine language program for executing an operation of a specified operation type with an additional operation digit number obtained by adding a predetermined additional number of digits (for example, “4 digits”) to the input operation digit number, The decimal arithmetic unit 70 is caused to execute the calculation (second calculation) (step B9).

次いで、CPU20は、第1演算及び第2演算で求められた演算結果の最上位桁の値を0以外の値にする正規化処理を行う(ステップB11)。   Next, the CPU 20 performs a normalization process for setting the value of the most significant digit of the calculation results obtained by the first calculation and the second calculation to a value other than 0 (step B11).

次に、CPU20は、第1演算結果と第2演算結果の各桁の値を比較し、値が一致しない桁の数を桁落ち桁数として検出して(ステップB13)、桁落ち桁数格納領域637に格納する。   Next, the CPU 20 compares the value of each digit of the first calculation result and the second calculation result, detects the number of digits whose values do not match as the number of digits discarded (step B13), and stores the number of digits discarded. Store in area 637.

その後、CPU20は、ステップB13において検出した桁落ち桁数と、ステップB1において入力された演算桁数との和が、ステップB9で第2演算を実行させた追加演算桁数以下であるかどうかを判定し(ステップB15)、追加演算桁数以下ではないと判定した場合には(ステップB15;No)、入力された演算桁数に、検出した桁落ち桁数と所定の追加桁数とを追加した新たな追加演算桁数で十進演算器70に第2演算を再度実行させる(ステップB17)。   Thereafter, the CPU 20 determines whether or not the sum of the number of digits removed in step B13 and the number of digits calculated in step B1 is equal to or less than the number of additional digits calculated in step B9. If it is determined (step B15) and it is determined that it is not less than or equal to the number of additional calculation digits (step B15; No), the detected number of lost digits and a predetermined additional number of digits are added to the input calculation digits The decimal arithmetic unit 70 is made to execute the second calculation again with the new additional calculation digits (step B17).

そして、CPU20は、再度求められた第2演算結果の最上位桁の値を0以外の値にする正規化処理を行い(ステップB19)、正規化した第2演算結果を入力された演算桁数に丸め(ステップB21)、丸めた第2演算結果を表示部40に表示させて(ステップB23)、第2演算表示処理を終了する。また、ステップB15において、追加演算桁数以下であると判定した場合には(ステップB15;Yes)、CPU20は、ステップB21に処理を移行する。   Then, the CPU 20 performs a normalization process for setting the value of the most significant digit of the second calculation result obtained again to a value other than 0 (step B19), and the number of calculation digits to which the normalized second calculation result is input. (Step B21), the rounded second calculation result is displayed on the display unit 40 (step B23), and the second calculation display process is terminated. On the other hand, if it is determined in step B15 that the number is less than or equal to the additional calculation digits (step B15; Yes), the CPU 20 shifts the process to step B21.

次に、これまでの処理について、表示画面例を参照しつつ、具体的に説明する。
図13(a)は、グラフ関数電卓1の表示部40に表示される表示画面の一例である表示画面403を示したものである。
Next, the processing so far will be specifically described with reference to a display screen example.
FIG. 13A shows a display screen 403 which is an example of a display screen displayed on the display unit 40 of the graph scientific calculator 1.

表示画面403では、第1実施形態と同様に演算桁数として「8」桁、演算種類として「(1+x)3−1」、被演算子として「0.00123」がそれぞれ入力・指定されている(図12のステップB1〜B5)。また、本実施形態では、入力された演算桁数(ここでは、「8桁」)に丸められた第2演算結果が、演算結果表示ボックス4031に表示される。 On the display screen 403, as in the first embodiment, “8” digits are input and designated as the calculation type, “(1 + x) 3 −1”, and “0.00123” as the operand. (Steps B1 to B5 in FIG. 12). In the present embodiment, the second calculation result rounded to the input calculation digit number (here, “8 digits”) is displayed in the calculation result display box 4031.

図13(b)は、第2演算結果が表示された場合の表示画面403を示したものである。演算結果表示ボックスには、入力された演算桁数8桁に丸められた第2演算結果として4031aで示される「3.6945406 e−3」が表示されている(図12のステップB21、B23)。この例では、第1演算結果に生じた桁落ちが3桁であり(図12のステップB13)、この桁落ち桁数3桁と演算桁数8桁との和11桁が、追加演算桁数以下であったために(図12のステップB15;Yes)、ステップB11において正規化された第2演算結果がそのまま8桁に丸められて表示されている(図12のステップB21、B23)。   FIG. 13B shows a display screen 403 when the second calculation result is displayed. In the calculation result display box, “3.6945406 e-3” indicated by 4031a is displayed as the second calculation result rounded to the input calculation digit number of 8 (steps B21 and B23 in FIG. 12). . In this example, the digit loss generated in the first calculation result is 3 digits (step B13 in FIG. 12), and 11 digits, which is the sum of 3 digits of the digit loss and 8 digits of the calculation digit, is the additional calculation digit number. Because of the following (step B15 in FIG. 12; Yes), the second calculation result normalized in step B11 is displayed by being rounded to 8 digits as it is (steps B21 and B23 in FIG. 12).

この演算結果は、入力された演算桁数8桁に所定の追加桁数4桁を追加した追加演算桁数12桁で演算を実行した演算結果を8桁に丸めたものであり、検出した桁落ち桁数が3桁であったことから、桁落ち桁が補正された正確な演算結果である。   This calculation result is obtained by rounding the calculation result obtained by performing the calculation with 12 additional calculation digits by adding the predetermined additional digit number of 4 digits to the input calculation digit number of 8 digits to the detected digit. Since the number of missing digits was 3, it is an accurate calculation result in which the lost digits were corrected.

以上の通りに、第2実施形態によれば、入力された演算桁数及び指定された演算種類に応じて演算を実行し、求められた演算結果の桁落ち桁数を検出すると共に、検出された桁落ち桁数に応じて桁落ち桁の補正を行った演算結果を表示させることができる。   As described above, according to the second embodiment, the calculation is performed according to the input number of calculation digits and the specified calculation type, and the number of digits discarded in the calculated calculation result is detected and detected. It is possible to display the calculation result obtained by correcting the digit digits depending on the number of digit digits.

尚、例えば検出した桁落ち桁数が5桁であり、桁落ち桁数5桁と演算桁数8桁との和13桁が、追加演算桁数12桁を超えたといった場合には(図12のステップB15;No)、演算桁数8桁に、桁落ち桁数5桁と所定の追加桁数4桁とを追加した新たな追加演算桁数17桁で演算が再度実行され(図12のステップB17)、この演算結果が8桁に丸められる(図12のステップB21)ことで演算結果が補正される。また、所定の追加桁数は4桁であることとして説明したが、これに限られるわけではなく、例えばユーザーにより設定されることにしてもよい。   For example, when the number of digits that have been detected is 5 and the sum of 13 digits including the number of digits to be discarded and 8 digits of calculation exceeds 12 digits of additional calculation (FIG. 12). Step B15; No), and the calculation is performed again with a new additional calculation digit number of 17 digits, which is obtained by adding 5 digits of lost digits and a predetermined additional digit number of 4 to the calculation digit number of 8 digits (FIG. 12). In step B17), this calculation result is rounded to 8 digits (step B21 in FIG. 12), thereby correcting the calculation result. In addition, although it has been described that the predetermined number of additional digits is four digits, it is not limited thereto, and may be set by a user, for example.

以上、2つの実施形態について、本発明を演算制御装置の一種であるグラフ関数電卓に適用した場合について説明したが、適用可能な製品はグラフ関数電卓に限らず、例えばグラフ描画機能を有しない電卓やパソコン、PDA(Personal Digital Assistance)等の電子機器にも適用可能である。   As described above, the case where the present invention is applied to the graph scientific calculator which is a kind of the arithmetic control device has been described in the two embodiments. However, the applicable product is not limited to the graph scientific calculator, for example, a calculator having no graph drawing function. It can also be applied to electronic devices such as personal computers, PDAs (Personal Digital Assistance).

また、十進演算器70は電子機器(上記実施形態ではグラフ関数電卓)に内蔵されているものとして説明したが、着脱自在に装着可能としてもよい。図14にその一例を示す。   Moreover, although the decimal arithmetic unit 70 was demonstrated as what was incorporated in the electronic device (in the said embodiment, a graph scientific calculator), it is good also as detachable mounting | wearing. An example is shown in FIG.

図14は、パソコン100と演算装置200とで構成される演算システムSを示したものである。演算装置200は、十進演算器70を内蔵したUSB(Universal Serial Bus)接続可能な小型機器であり、端子U1をPC100のUSBポートU2に差し込むことで相互にデータ通信可能となる。   FIG. 14 shows an arithmetic system S composed of the personal computer 100 and the arithmetic device 200. The arithmetic device 200 is a small device capable of USB (Universal Serial Bus) connection, which incorporates a decimal arithmetic unit 70, and enables data communication with each other by inserting the terminal U1 into the USB port U2 of the PC 100.

本発明を適用したグラフ関数電卓の概観図。1 is an overview diagram of a graph scientific calculator to which the present invention is applied. 本発明を適用したグラフ関数電卓の内部構成を示すブロック図。The block diagram which shows the internal structure of the graph scientific calculator to which this invention is applied. 十進演算器の回路構成を示す図。The figure which shows the circuit structure of a decimal arithmetic unit. (a)直接/間接アドレス方式を示す図。(b)拡張命令コードEXTを示す図。(c)命令とその動作の一例を示す図。(A) The figure which shows a direct / indirect address system. (B) The figure which shows the extended instruction code EXT. (C) The figure which shows an example of an instruction | command and its operation | movement. (a)第1実施形態におけるROMのデータ構成を示す図。(b)第1実施形態におけるRAMのデータ構成を示す図。(A) The figure which shows the data structure of ROM in 1st Embodiment. (B) The figure which shows the data structure of RAM in 1st Embodiment. 第1演算表示処理の流れを示すフローチャート。The flowchart which shows the flow of a 1st calculation display process. (a)第1演算表示処理において表示される表示画面の一例を示す図。(b)演算種類が指定される場合の表示画面の一例を示す図。(A) The figure which shows an example of the display screen displayed in a 1st calculation display process. (B) The figure which shows an example of the display screen in case a calculation kind is designated. (a)演算桁数の入力、演算種類の指定及び被演算子の入力がなされた場合の表示画面の一例を示す図。(b)第1演算結果が表示された場合の表示画面の一例を示す図。(A) The figure which shows an example of the display screen at the time of the input of the number of calculation digits, designation | designated of a calculation type, and the input of an operand being made. (B) The figure which shows an example of the display screen when a 1st calculation result is displayed. (a)桁落ち桁数表示指示がなされた場合の表示画面の一例を示す図。(b )有効精度桁数表示指示がなされた場合の表示画面の一例を示す図。(A) The figure which shows an example of the display screen when a digit removal digit number display instruction | indication is made. (B) The figure which shows an example of the display screen when the effective precision digit number display instruction | indication is made. (a)桁数増加表示指示がなされた場合の表示画面の一例を示す図。(b)桁落ち部分識別表示指示がなされた場合の表示画面の一例を示す図。(A) The figure which shows an example of the display screen in case the digit number increase display instruction | indication is made. (B) The figure which shows an example of the display screen at the time of instruction | indication of a digit part identification display. (a)第2実施形態におけるROMのデータ構成を示す図。(b)第2実施形態におけるRAMのデータ構成を示す図。(A) The figure which shows the data structure of ROM in 2nd Embodiment. (B) The figure which shows the data structure of RAM in 2nd Embodiment. 第2演算表示処理の流れを示すフローチャート。The flowchart which shows the flow of a 2nd calculation display process. (a)第2演算表示処理において演算桁数の入力、演算種類の指定及び被演算子の入力がなされた場合の表示画面の一例を示す図。(b)丸められた第2演算結果が表示された場合の表示画面の一例を示す図。(A) The figure which shows an example of the display screen at the time of the input of the number of calculation digits, the designation | designated of a calculation type, and the input of an operand being made in 2nd calculation display processing. (B) The figure which shows an example of the display screen when the rounded 2nd calculation result is displayed. パソコンとUSB演算装置で構成される演算システムの一例を示す図。The figure which shows an example of the arithmetic system comprised with a personal computer and USB arithmetic device.

符号の説明Explanation of symbols

1 グラフ関数電卓
3 キー群
3a 数字キー群
3b 方向キー
3c EXEキー
3d 桁落ち桁数表示キー
3e 有効精度桁数表示キー
3f 桁数増加表示キー
3g 桁落ち部分識別表示キー
4 ディスプレイ
20 CPU
30 入力部
40 表示部
50 ROM
511 第1演算表示プログラム
531 第2演算表示プログラム
60 RAM
611、631 演算桁数格納領域
613、633 演算種類格納領域
615、635 被演算子格納領域
617、637 桁落ち桁数格納領域
619 有効精度桁数格納領域
70 十進演算器
710 プログラムROM
712 プログラムカウンタ
714 ラッチ部
716 命令デコーダ
720 可変パラメータ記憶部
731〜734 セレクタ
740 アドレスカウンタ
750 アドレス制御回路
760 レジスタ部
770 演算器
780 シフタ
80 バス
DESCRIPTION OF SYMBOLS 1 Graph scientific calculator 3 Key group 3a Number key group 3b Direction key 3c EXE key 3d Digit digit display key 3e Effective precision digit display key 3f Digit increase display key 3g Digit part identification display key 4 Display 20 CPU
30 Input unit 40 Display unit 50 ROM
511 First calculation display program 531 Second calculation display program 60 RAM
611, 631 Operation digit number storage area 613, 633 Operation type storage area 615, 635 Operand storage area 617, 637 Digit digit number storage area 619 Effective precision digit number storage area 70 Decimal arithmetic unit 710 Program ROM
712 Program counter 714 Latch unit 716 Instruction decoder 720 Variable parameter storage unit 731 to 734 Selector 740 Address counter 750 Address control circuit 760 Register unit 770 Calculator 780 Shifter 80 Bus

Claims (2)

演算桁数をユーザー操作に従って入力する演算桁数入力手段と、
演算の種類をユーザー操作に従って指定する演算種類指定手段と、
この演算種類指定手段により指定された種類の演算を、前記演算桁数入力手段により入力された演算桁数で実行する演算実行手段と、
前記演算桁数入力手段により入力された演算桁数に所定の追加桁数を追加した追加演算桁数で演算を再実行する追加演算実行手段と、
この追加演算実行手段による演算結果の各桁の値と前記演算実行手段による演算結果の各桁の値とを比較し、値が一致しない桁の数を桁落ち桁数として検出する桁落ち桁数検出手段と、
前記桁落ち桁数検出手段により検出された桁落ち桁数と前記演算桁数入力手段により入力された演算桁数との和が、前記追加演算実行手段により演算された追加演算桁数以下である場合に、前記追加演算実行手段による演算結果を、前記演算桁数に丸めて表示する制御を行う表示制御手段と、
を備えることを特徴とする演算制御装置。
Calculation digit number input means for inputting the calculation digit number according to the user operation;
A calculation type specifying means for specifying a calculation type according to a user operation;
An operation executing means for executing the operation of the type specified by the operation type specifying means with the operation digit number input by the operation digit number input means;
An additional calculation execution means for re-executing the calculation with an additional calculation digit number obtained by adding a predetermined additional digit number to the calculation digit number input by the calculation digit number input means;
Compare the value of each digit of the calculation result by this additional calculation execution means with the value of each digit of the calculation result by the calculation execution means, and detect the number of digits that do not match as the number of digits to be discarded Detection means;
The sum of the number of digits discarded by the digit number detection means and the number of digits calculated by the calculation digit number input means is equal to or less than the number of additional calculation digits calculated by the additional calculation execution means. Display control means for performing control to display the calculation result by the additional calculation execution means by rounding to the number of calculation digits ;
An arithmetic and control unit comprising:
コンピュータに、
演算桁数をユーザー操作に従って入力する演算桁数入力手段と、
演算の種類をユーザー操作に従って指定する演算種類指定手段と、
この演算種類指定手段により指定された種類の演算を、前記演算桁数入力手段により入力された演算桁数で実行する演算実行手段と、
前記演算桁数入力手段により入力された演算桁数に所定の追加桁数を追加した追加演算桁数で演算を再実行する追加演算実行手段と、
この追加演算実行手段による演算結果の各桁の値と前記演算実行手段による演算結果の各桁の値とを比較し、値が一致しない桁の数を桁落ち桁数として検出する桁落ち桁数検出手段と、
前記桁落ち桁数検出手段により検出された桁落ち桁数と前記演算桁数入力手段により入力された演算桁数との和が、前記追加演算実行手段により演算された追加演算桁数以下である場合に、前記追加演算実行手段による演算結果を、前記演算桁数に丸めて表示する制御を行う表示制御手段と、
を実現させるためのプログラム。
On the computer,
Calculation digit number input means for inputting the calculation digit number according to the user operation;
A calculation type specifying means for specifying a calculation type according to a user operation;
An operation executing means for executing the operation of the type specified by the operation type specifying means with the operation digit number input by the operation digit number input means;
An additional calculation execution means for re-executing the calculation with an additional calculation digit number obtained by adding a predetermined additional digit number to the calculation digit number input by the calculation digit number input means;
Compare the value of each digit of the calculation result by this additional calculation execution means with the value of each digit of the calculation result by the calculation execution means, and detect the number of digits that do not match as the number of digits to be discarded Detection means;
The sum of the number of digits discarded by the digit number detection means and the number of digits calculated by the calculation digit number input means is equal to or less than the number of additional calculation digits calculated by the additional calculation execution means. Display control means for performing control to display the calculation result by the additional calculation execution means by rounding to the number of calculation digits ;
A program to realize
JP2004250678A 2004-08-30 2004-08-30 Arithmetic control device and program Active JP4193773B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2004250678A JP4193773B2 (en) 2004-08-30 2004-08-30 Arithmetic control device and program
US11/109,888 US7716267B2 (en) 2004-08-30 2005-04-19 Decimal computing apparatus, electronic device connectable decimal computing apparatus, arithmetic operation apparatus, arithmetic operation control apparatus, and program-recorded recording medium
US12/428,288 US8316067B2 (en) 2004-08-30 2009-04-22 Decimal computing apparatus, electronic device connectable decimal computing apparatus, arithmetic operation apparatus, arithmetic operation control apparatus, and program-recorded recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004250678A JP4193773B2 (en) 2004-08-30 2004-08-30 Arithmetic control device and program

Publications (2)

Publication Number Publication Date
JP2006065789A JP2006065789A (en) 2006-03-09
JP4193773B2 true JP4193773B2 (en) 2008-12-10

Family

ID=36112197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004250678A Active JP4193773B2 (en) 2004-08-30 2004-08-30 Arithmetic control device and program

Country Status (1)

Country Link
JP (1) JP4193773B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4997812B2 (en) * 2006-03-31 2012-08-08 カシオ計算機株式会社 Calculation apparatus and calculation program

Also Published As

Publication number Publication date
JP2006065789A (en) 2006-03-09

Similar Documents

Publication Publication Date Title
JPH06202850A (en) Data processor
JP5012935B2 (en) Formula arithmetic device and program
US7995063B2 (en) Figure rendering apparatus and figure rendering method
JP4193773B2 (en) Arithmetic control device and program
JP4997812B2 (en) Calculation apparatus and calculation program
US4507743A (en) Calculation system utilizing definable keys
JP2009059256A (en) Electronic device capable of drawing graph, and program
USRE46215E1 (en) Computing machine with an inequality computation function
US8316067B2 (en) Decimal computing apparatus, electronic device connectable decimal computing apparatus, arithmetic operation apparatus, arithmetic operation control apparatus, and program-recorded recording medium
JP6504128B2 (en) Electronic device, data processing method and program
US9921999B2 (en) Electronic device, display method at time of execution of verification with electronic device, and storage medium
JP4893340B2 (en) Calculation apparatus and calculation program
CA1173164A (en) Fraction calculator
JP4192868B2 (en) Scientific calculator
JP5315712B2 (en) Electronic device having arithmetic function and arithmetic processing program
JPS6225213B2 (en)
JPH021627Y2 (en)
JPH0616278B2 (en) Calculation mode setting device for desktop computer
JP2700960B2 (en) Electronic desk calculator
US6628293B2 (en) Format varying computer system
JPS61275960A (en) Electronic calculator with graphic display function
JPS6225208B2 (en)
JPS5921068B2 (en) Program step calculation method
JPH0335345A (en) Compact electronic computer
JPH0420498B2 (en)

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080806

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: 20080902

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080915

R150 Certificate of patent or registration of utility model

Ref document number: 4193773

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111003

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121003

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121003

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131003

Year of fee payment: 5