Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPS6131891B2 - - Google Patents
[go: Go Back, main page]

JPS6131891B2 - - Google Patents

Info

Publication number
JPS6131891B2
JPS6131891B2 JP55050090A JP5009080A JPS6131891B2 JP S6131891 B2 JPS6131891 B2 JP S6131891B2 JP 55050090 A JP55050090 A JP 55050090A JP 5009080 A JP5009080 A JP 5009080A JP S6131891 B2 JPS6131891 B2 JP S6131891B2
Authority
JP
Japan
Prior art keywords
register
integral
calculation
contents
accuracy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP55050090A
Other languages
Japanese (ja)
Other versions
JPS56147240A (en
Inventor
Hisashi Ito
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP5009080A priority Critical patent/JPS56147240A/en
Priority to GB8110834A priority patent/GB2073922B/en
Priority to US06/252,944 priority patent/US4398263A/en
Priority to DE19813115268 priority patent/DE3115268A1/en
Publication of JPS56147240A publication Critical patent/JPS56147240A/en
Publication of JPS6131891B2 publication Critical patent/JPS6131891B2/ja
Priority to HK654/89A priority patent/HK65489A/en
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Calculators And Similar Devices (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明は、被積分関数の分割数を定積分演算結
果の精度に応じて自動的に設定するようにした積
分演算機能を有する小型電子計算機に関する。 従来、例えば∫ab1/x+1dxなる積分を行なうに 際し、予め筆算等により〔n(x+1)〕 を求
め、n(b+1)−n(a+1)の演算を計
算機を用いて行なつていたが、これでは積分演算
を熟知した者でしか演算できないし、また、複雑
な式になると非常に面倒になる欠点があつた。そ
こで、例えばxのn次多項式の定積分∫ab
(k1xn+k2xn-1+……)dxに対して、〔k/n+1x
o+1 +k/nxo+……〕 の様に被積分関数の不定積
分を 公式としてROMに予め記憶させておき、演算実
行時に積分区間a、b、係数k1、k2……、べき数
n等のデータを入力するのみで積分演算を行なえ
るようにしたものが考えられている。 しかし、上記の方法では被積分関数の不定積分
を予めROMに記憶させなければならないため、
そこに記憶できる被積分関数の種類も自ら限られ
たものとなる欠点があつた。 そこで、出願人はシンプソン(Simpson)の公
式等を用い、これにより任意の関数に対して積分
可能なような小型電子計算機を提案した。このよ
うな計算機は、所定の区間を積分する際に、その
区間を所定個に分割して演算するものであるた
め、演算の都度分割数を設定することが必要とな
る。 しかしながら、シンプソンの公式等では一般に
分割数が多い程演算精度は高くなるが、分割され
たきざみ幅が小さくなり過ぎると演算回数が増し
て演算結果の丸め誤差が累積され、ある一定の分
割数から逆に誤差が増大することになる。 本発明は上記事情に鑑みて成されたもので、前
回の演算結果と今回の演算結果とを比較すること
により演算精度を導き出し、この演算精度が一定
の精度に達するまで順次演算を行なうように分割
数を自動的に設定するようにした積分演算機能を
有する小型電子式計算機を提供することを目的と
する。 本発明では上記の目的を達成するために、例え
ばシンプソンの公式を用いており、被積分関数を
(x)とし、区間〔a、b〕を2oに分割した
場合は、次のような漸化式で表わされる。 S1=h/3{(a)+(b)}+4/3h1(a+h1
)…(1) T1=4/3h1(a+h1) …(2) Sn=1/2{So-1−1/2To-1}+Tn …(4) 但し hn=b−a/2n これにより、Snが積分値となる。 以下、図面を参照しながら本発明の一実施例に
ついて説明する。第1図は本発明の構成を示す回
路ブロツク図で、図中1は各種マイクロ命令がス
トアされているROM(リードオンメモリ)であ
る。このROM1から後述するRAM(ランダムア
クセスメモリ)2のレジスタを指定するための行
アドレス信号U、上記レジスタの桁を指定するた
めの列アドレス信号L、各種演算、大小比較等の
判断に用いられる数値コード信号C0、演算命
令、ゲート制御信号等のインストラクシヨン信号
INS、自己の次アドレスを指定する次アドレス信
号NAが各々バスラインa〜eを介して並列的に
出力される。そして、バスラインeを介して出力
される次アドレス信号NAはROMアドレス部3に
送られる。このROMアドレス部3は、上記次ア
ドレス信号NAに従つてROM1のアドレス指定を
行なう。また、インストラクシヨンINSはバスラ
インdを介してインストラクシヨンデコーダ4に
供給される。このインストラクシヨンデコーダ4
はインストラクシヨンINSをデコーダして、ゲー
ト制御信号I1〜I8、リード/ライト信号R/W1
R/W2、減算命令SUb、指定桁長さモードM、
インクリメント信号INC等の各種制御信号を出力
する。上記指定桁長さモードMは第1のアドレス
カウンタ2aに送られ、RAM2のレジスタの桁
を複数桁に亘つて指定する場合に出力される。 上記ROM1から出力される行アドレス信号U
はバスラインaを介してRAM2の行アドレス入
力端子RUへ入力される。また、列アドレス信号
Lはバスラインb、第1アドレスカウンタ2aを
介して列アドレス入力端RLに入力される。 RAM2は第2図に示すようにX、Y、Zの演
算レジスタ、及びA、B、N、H、K、T、R、
S、Eの積分用レジスタ等から構成されている。
Aレジスタには積分の区間〔a、b〕の下限のデ
ータ(a)、Bレジスタには積分の区間の上限データ
(b)が記憶される。またNレジスタには分割パラメ
ータが記憶される。Hレジスタには上記積分区間
aからbまでの幅を2oで除したきざみ幅b−a/2
が 記憶され、Kレジスタには上記(3)式における累算
用パラメータが記憶される。Rレジスタは上記(4)
式におけるSo-1つまり前回の積分値が記憶され
る。さらにT及びSレジスタには上記(3)、(4)式で
表わされるTn及びSnの値が記憶される。Eレジ
スタにはRレジスタに記憶されている前回の積分
値及びSレジスタに記憶されている今回の積分値
から求められる演算精度を表わす値が記憶され
る。そして、上記夫々のレジスタのデータの書き
込み、読み出しはR/W1信号により制御され
る。 一方、RAM2の出力端OUTから出力されたデ
ータは演算数、被演算数として夫々制御信号I3
I4が入力されているゲート回路G3、G4を介して演
算回路5の入力端a、bに入力される。演算回路
5で演算された演算結果は上記RAM2の入力端
INに入力される。上記RAM2は、この中に記憶
されているアドレスデータがゲート回路G2を介
して第1のアドレスカウンタ2aにセツトされる
ことによつて間接的にもアドレス指定される。ま
た、上記演算回路5の出力データはゲート制御信
号I5が印加されているゲート回路G5を介して表示
部6へも送られ、表示が成される。更に、上記演
算回路5からデータの大小比較等の判断の際には
データの有無、キヤリーの有無を示す判断信号が
ROMアドレス部3へ出力される。 7はキー入力部で、被積分関数を書き込む書き
込みモード、積分を実行する実行モード、あるい
は通常の演算を行なうモード等を指定する
The present invention relates to a small-sized electronic computer having an integral calculation function that automatically sets the number of divisions of an integrand according to the accuracy of a definite integral calculation result. Conventionally, when performing an integral such as ∫a b 1/x + 1dx, for example, [n(x+1)] b a was calculated in advance by hand calculation, etc., and the calculation of n(b+1) - n(a+1) was performed using a computer. However, this method had the disadvantage that only those who were familiar with integral calculations could perform the calculation, and that it became extremely troublesome when the equation became complicated. So, for example, the definite integral ∫a b of the nth degree polynomial of x
(k 1 x n + k 2 x n-1 +...) for dx, [k 1 /n+1x
o+1 +k 2 /nx o +...] b The indefinite integral of the integrand is stored in the ROM as a formula as shown in a , and when the calculation is executed, the integral intervals a, b, coefficients k 1 , k 2 , etc. . . , a system has been considered in which an integral operation can be performed simply by inputting data such as an exponent n. However, in the above method, the indefinite integral of the integrand must be stored in ROM in advance, so
The drawback was that the types of integrands that could be stored there were also limited. Therefore, the applicant proposed a compact electronic computer that can integrate any function using Simpson's formula. When such a calculator integrates a predetermined interval, it divides the interval into predetermined parts and performs the calculation, so it is necessary to set the number of divisions each time the calculation is performed. However, according to Simpson's formula, etc., the higher the number of divisions, the higher the calculation accuracy, but if the division width becomes too small, the number of calculations will increase, and rounding errors in the calculation results will accumulate, and from a certain number of divisions, the calculation accuracy will be higher. The error will increase. The present invention has been made in view of the above circumstances, and calculates the calculation accuracy by comparing the previous calculation result and the current calculation result, and performs calculations sequentially until the calculation accuracy reaches a certain level of accuracy. It is an object of the present invention to provide a small electronic calculator having an integral calculation function that automatically sets the number of divisions. In order to achieve the above object, the present invention uses, for example, Simpson's formula, and when the integrand is (x) and the interval [a, b] is divided into 2 o , the following gradual It is expressed by the following formula. S 1 =h 1 /3{(a)+(b)}+4/3h 1 (a+h 1
)…(1) T 1 =4/3h 1 (a+h 1 )…(2) Sn=1/2 {S o-1 -1/2T o-1 }+Tn...(4) However, hn=ba/2n As a result, Sn becomes an integral value. An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a circuit block diagram showing the configuration of the present invention. In the figure, numeral 1 is a ROM (read-on memory) in which various microinstructions are stored. A row address signal U for specifying a register of RAM (random access memory) 2, which will be described later, from this ROM1, a column address signal L for specifying a digit of the above register, and a numerical value used for various calculations, size comparisons, etc. Instruction signals such as code signal C 0 , operation command, gate control signal, etc.
INS and a next address signal NA specifying its own next address are output in parallel via bus lines a to e, respectively. The next address signal NA output via bus line e is sent to the ROM address section 3. The ROM address section 3 specifies the address of the ROM 1 in accordance with the next address signal NA. Further, the instruction INS is supplied to the instruction decoder 4 via the bus line d. This instruction decoder 4
decodes the instruction INS and outputs gate control signals I 1 to I 8 , read/write signals R/W 1 ,
R/W 2 , subtraction instruction SUb, specified digit length mode M,
Outputs various control signals such as increment signal INC. The specified digit length mode M is sent to the first address counter 2a, and is output when specifying a plurality of digits in the register of the RAM 2. Row address signal U output from ROM1 above
is input to the row address input terminal RU of RAM2 via bus line a. Further, the column address signal L is inputted to the column address input terminal RL via the bus line b and the first address counter 2a. As shown in FIG. 2, RAM2 has operation registers for X, Y, Z, and
It consists of registers for integration of S and E, etc.
The A register contains the lower limit data (a) of the integral interval [a, b], and the B register contains the upper limit data of the integral interval.
(b) is memorized. Further, the division parameter is stored in the N register. The H register contains the step width b - a/2 o , which is the width of the above integral interval a to b divided by 2 o .
is stored, and the accumulation parameter in the above equation (3) is stored in the K register. R register is above (4)
S o-1 in the equation, that is, the previous integral value is stored. Further, the Tn and Sn values expressed by the above equations (3) and (4) are stored in the T and S registers. The E register stores a value representing the calculation accuracy determined from the previous integral value stored in the R register and the current integral value stored in the S register. The writing and reading of data in each of the above registers is controlled by the R/W1 signal. On the other hand, the data output from the output terminal OUT of RAM2 is controlled by the control signals I 3 and 3 as the operand and operand, respectively.
I 4 is input to input terminals a and b of the arithmetic circuit 5 via gate circuits G 3 and G 4 to which it is input. The calculation result calculated by the calculation circuit 5 is input to the input terminal of the RAM 2 mentioned above.
Input to IN. The RAM 2 is also indirectly addressed by setting the address data stored therein into the first address counter 2a via the gate circuit G2. Further, the output data of the arithmetic circuit 5 is also sent to the display section 6 via the gate circuit G5 to which the gate control signal I5 is applied, and is displayed. Furthermore, the arithmetic circuit 5 outputs a judgment signal indicating the presence or absence of data and the presence or absence of carry when making judgments such as comparing the size of data.
It is output to the ROM address section 3. 7 is the key input section, which specifies the write mode for writing the integrand, the execution mode for performing integration, or the mode for normal calculations, etc.

【式】キー7a、積分の実行指示をする[Formula] Key 7a, instructs execution of integral

【式】キー7b、データを入力する置数キー、 四則演算、S1n、COS等の種々の演算を指示する
フアンクシヨンキーを備えている。そして、上記
のモードの指定は
It is equipped with a [Formula] key 7b, a numeric key for inputting data, and a function key for instructing various operations such as four arithmetic operations, S1n, and COS. And the above mode specification is

【式】キー7aと置数キー との組合せで行なわれる。このキー入力部7には
RAM2内の図示しないレジスタからキーサンプ
リングデータが順次ゲート回路G7を介した後デ
コーダ8でデコードされて入力され、キーサンプ
リングが行なわれる。しかして、キー入力部7で
キー操作が行われなければ上記レジスタに対し
「+1」して同様の動さを巡り返し、キーが操作
されるとキーデータはゲート回路G8、演算回路
5を介してRAM2の所定レジスタに書き込まれ
る。 また、上記モード指定キー
[Formula] This is performed using a combination of the key 7a and the numeric key. This key input section 7
Key sampling data from a register (not shown) in the RAM 2 is sequentially passed through a gate circuit G7 , decoded and inputted to a decoder 8, and key sampling is performed. However, if no key operation is performed in the key input section 7, the above register is incremented by "+1" and the same operation is repeated, and when a key is operated, the key data is sent to the gate circuit G 8 and the arithmetic circuit 5. The data is written to a predetermined register in RAM2 via the data. In addition, the above mode specification key

【式】7aによ つて被積分関数の書き込みモードが指定された
時、上記キー入力部7から入力された関数データ
は一旦RAM2に書き込まれた後、ゲート回路G6
を介してRAM9の入力端INに書き込まれ、積分
の実行モードではRAM9に書き込まれ被積分関
数がRAM2へ読み出されて積分演算が実行され
る。なお、このRAM9は上記INC信号によつて
インクリメントされる第2のレジスタカウンタ9
aにより順次アドレス指定されると共に、リー
ド/ライト信号R/Wによつて書き込み、読み
出しの制御が行なわれる。 次に、上記の如く構成された本発明の動作を第
3図乃至第5図の状態図及びフローチヤートを参
照しながら説明する。ここでは、例えば被積分関
数を(x)=1/x+1、区間を〔0.2〕としして∫
1/x+1dxなる演算を行なうことにする。 先ず、キー入力部7の
When the write mode of the integrand function is specified by [Formula 7a], the function data input from the key input section 7 is once written to the RAM 2, and then sent to the gate circuit G 6
In the integral execution mode, the integrand function written to the RAM 9 is read out to the RAM 2 and the integral operation is executed. Note that this RAM 9 has a second register counter 9 that is incremented by the above INC signal.
Addresses are sequentially specified by a, and writing and reading are controlled by a read/write signal R/ W2 . Next, the operation of the present invention configured as described above will be explained with reference to the state diagrams and flowcharts of FIGS. 3 to 5. Here, for example, let's assume that the integrand is (x) = 1/x + 1 and the interval is [0.2] ∫
Let us perform the calculation 2 0 1/x + 1dx. First, the key input section 7

【式】キー7aと置 数キーとのの操作により被積分関数の書き込みモ
ードに設定する。そして、関数1/x+1を入力すべ くキー操作で、RAM9には第3図に示すような
プログラムデータとして書き込まれる。即ち、例
えば
The integrand function writing mode is set by operating the [Formula] key 7a and the numeric key. Then, by operating a key to input the function 1/x+1, it is written into the RAM 9 as program data as shown in FIG. That is, for example

【式】□1のキー操作で変数xの定義が成 される。そして[Formula] □The definition of variable x is completed by key operation 1. be done. and

【式】のキー操作により変数が 読み出され、次の□+、□1のキー操作によつて上記
変数に対して「+1」が行なわれる。更に、
A variable is read by key operation of [Formula], and "+1" is added to the variable by the next key operation of □+ and □1. Furthermore,

【式】のキー操作で「x+1」の逆数関数 1/x+1の指示が行われ、□=のキー操作でその実行 が行われる。以上のキー操作で被積分関数
(x)=1/x+1の入力が終了する。次に、
The [Formula] key operation instructs the reciprocal function 1/x+1 of "x+1", and the □= key operation executes it. The above key operations complete the input of the integrand function (x)=1/x+1. next,

【式】キー7a、置数キーの操作により積分 実行モードに切換わる。しかして、積分区間デー
タ「0」、「2」を置数するとAレジスタに
「0」、Bレジスタの「2」が夫々書き込まれる。 この状態で、積分実行キー
By operating the [Formula] key 7a and the numeric key, the mode is switched to the integral execution mode. Therefore, when the integral interval data "0" and "2" are entered, "0" and "2" are written in the A register and the B register, respectively. In this state, press the integral execution key.

【式】7bを操作 すると第4図に示すフローチヤートに従つて定積
分の実行が行なわれる。なお、このフローチヤー
トに示された(1)〜(20)の番号は第5図の状態図
に対応する。ステツプS1は分割パラメータとして
NレジスタROM1から出力される数値コード信
号C0「1」が演算回路5を介してRAM2のNレ
ジスタに書き込まれる。次の処理S2では上記A、
Bレジスタに記憶されている積分区間の幅を2o
で除したきざみ幅が記憶される。即ち、A、Bレ
ジスタの内容が演算回路5へ読み出されて「2−
0」の減算が行われた後、減算結果「2」はBレ
ジスタに一旦書き込まる。そして、Nレジスタの
内容に対して2Nの演算が演算レジスタによつて
行われる。従つて今、Nレジスタの内容が「1」
であるから2Nは「2」となる。更に上記Bレジ
スタに記憶されている減算結果「2」と2Nの値
「2」との除算が演算回路5で行われ、その演算
結果「1」はHレジスタに書き込まれ、処理S3
進む。 処理S3はx=a+hの値(a+h)の演算が
行われるもので、Aレジスタの内容とHレジスタ
の内容とが加算され、更にその加算結果を予め入
力した被積分関数1/x+1に代入することにより、 その値が算出された後、その値はTレジスタに書
き込まれる。即ち、Aレジスタ、Hレジスタの内
容は夫々「0」、「1」であるから、その加算結果
は「1」となる。そして、RAM9に書き込まれ
ている被積分関数は第2のアドレスカウンタ9a
でアドレス指定されながら第3図に示すプログラ
ム内容が1ステツプずつRAM2、演算回路5へ
送られ、上記加算結果「1」に基づいて(1)の演
算が行われる。この結果、(1)の値は「0.5」と
なり、第5図(1)に示すようにTレジスタに書き込
まれる。 次に、処理S4へ進み、上記(1)式の前項h/3{(
a) +(b)}の演算が行なわれる。今、Aレジスタの
内容が「0」であるから(a)=(0)は「1」
となり、Bレジスタの内容が「2」であるから
(b)=(2)は「0.3…3」となる。そして(a)と
(b)の加算結果には、Hレジスタの内容を「3」で
除した値1/3が掛けられ、その演算結果「0.4…
4」は第5図(1)に示すようにSレジスタに書き込
まれる。 処理S5は上記(1)式の後項の4/3h1(a+h1)の
演 算を行なうもので、HレジスタとTレジスタの内
容を乗算したものに対し更に定数4/3を乗算し、そ の演算結果を再びTレジスタに書き込むものであ
る。即ち、Hレジスタの内容「1」及びTレジス
タの内容「0.5」は演算回路5へ供給されて「1
×0.5」の乗算が行れ、その演算結果は一旦Tレ
ジスタに書き込まれたのち再び演算回路5へ送出
されると共にROM1から数値コード信号C0(4/3= 1.3…3)も演算回路5へ供給され乗算が行われ
る。そして、その演算結果「0.6…6」は第5図
(2)に示すようにTレジスタに書き込まれ、次のス
テツプS6に進む。ステツプS6は上記(1)式の前項と
後項とを加算するもので、Sレジスタの内容
「0.4…4」とTレジスタの内容「0.6…6」とが
演算回路5へ読み出されて加算される。そして、
その加算結果「1.1…1」は第5図(2)に示すよう
に再びSレジスタに書き込まれる。従つてこのS
レジスタは上記(1)式のS1の値が記憶されることに
なる。 次のステツプS7は、前回の積分値を記憶したR
レジスタの内容と今回の積分値を記憶したSレジ
スタの内容との差を求め、その差をSレジスタの
内容の今回の積分値で割ることにより積分値の精
度を求めるようにしたものである。即ち、S、R
レジスタの内容は共に演算回路5へ送されて両者
の差が求められ、更にSレジスタの内容による険
算が行われる。今、Rレジスタの内容は第5図(2)
に示すように「0」であるから、Eレジスタには
第5図(3)の如く「1」が書き込まれる。そして、
次のステツプS8では、上記Eレジスタの内容が
「1×10-4」より小さいか否かの判断により、積
分値が所定の精度まで求められたか否かの検出が
成される。上記演算回路5へは、Eレジスタの内
容及びROM1から出力される数値コード信号C0
(1×10-4)が供給され、そこで大小の比較判断
が行われる。判断結果はデータの有無、キヤリー
の有無を示す判断信号としてROMアドレス部3
へ送られる。今、Eレジスタの内容が、第5図(3)
に示すように「1」であるから、「NO」となつて
次のステツプS9へ進む。 ステツプS9はNレジスタに記憶されている分割
パラメータの値が特定値(「10」)に達したか否か
を判断することにより、被積分関数によつて所定
の精度に達しない場合に積分演算を途中で終了さ
せるためのものである。上記ステツプ同様にNレ
ジスタ内容及び数値コード信号C0(10)とが演
算回路5へ送られ、一致比較が成される。ここで
はNレジスタの内容が「1」であるから、次のス
テツプS10へ進む。 ステツプS10ではSレジスタの内容をRレジス
タへ転送する動作が演算回路5を介て行われ、第
5図(3)に示すようにRレジスタに「1.1…1」が
書き込まれ、次の処理S11へ進む。 処理S11は上記(4)式の前項を実行するもので、
Sレジスタの内容からTレジスタの内容を「2」
で除した値を引き、更にそれを「2」で割るもの
である。この結果、Sレジスタには第5図(3)に示
すように「0.38…8」が書き込まれる。次の処理
S12では上記Nレジスタの分割パラメータをべき
乗とする2Nの演算が行われ、Kレジスタに書き
込まれる。従つて、Nレジスタの内容は「1」で
あるから第5図(4)に示すように「2」がKレジス
タに書き込まれ、そして次のステツプS13に進
む。ステツプS13はNレジスタの内容に「+1」
することにより、分割パラメータを「1」だけ増
加させるもので、これによりNレジスタの内容は
「2」となる。 次の処理S14は上記Hレジスタの内容のきざみ
幅を「2」で割ることにより、新たなきざみ幅を
設定するもので、Hレジスタの内容は「0.5」と
なり、ステツプS15へ進む。ステツプS15ではレジ
スタTに「0」が書き込まれてクリアされる。 しかして、次の処理S16乃至ステツプS20では上
記(3)式の
When Equation 7b is operated, the definite integral is executed according to the flowchart shown in FIG. Note that the numbers (1) to (20) shown in this flowchart correspond to the state diagram in FIG. In step S1 , the numerical code signal C0 " 1" outputted from the N register ROM1 as a division parameter is written into the N register of the RAM2 via the arithmetic circuit 5. In the next process S2 , the above A,
Set the width of the integral interval stored in the B register to 2 o
The step width divided by is memorized. That is, the contents of the A and B registers are read out to the arithmetic circuit 5 and
After the subtraction of "0" is performed, the subtraction result "2" is temporarily written to the B register. Then, 2 N operations are performed on the contents of the N register by the operation register. Therefore, the content of the N register is now "1"
Therefore, 2 N becomes "2". Furthermore, the subtraction result "2" stored in the B register is divided by the value "2" of 2 N in the arithmetic circuit 5, and the arithmetic result "1" is written to the H register, and the process proceeds to step S3 . move on. Process S3 is the calculation of the value (a+h) of x=a+h, in which the contents of the A register and the contents of the H register are added, and the addition result is then assigned to the integrand function 1/x+1 input in advance. After the value is calculated, the value is written to the T register. That is, since the contents of the A register and the H register are "0" and "1", respectively, the addition result is "1". The integrand function written in the RAM 9 is stored in the second address counter 9a.
The program contents shown in FIG. 3 are sent step by step to the RAM 2 and the arithmetic circuit 5 while being addressed by , and the arithmetic operation (1) is performed based on the addition result "1". As a result, the value of (1) becomes "0.5" and is written to the T register as shown in FIG. 5 (1). Next, proceed to process S 4 , and calculate the previous term h 1 /3 {(
a) +(b)} is performed. Now, since the content of the A register is "0", (a) = (0) is "1"
Since the content of the B register is "2",
(b)=(2) becomes "0.3...3". and (a)
The addition result in (b) is multiplied by 1/3, which is the content of the H register divided by 3, and the result is 0.4...
4'' is written to the S register as shown in FIG. 5(1). Processing S5 is to perform the operation of 4/3h 1 (a+h 1 ) in the latter term of the above equation (1), which is to multiply the contents of the H register and the T register by a constant 4/3, The calculation result is written to the T register again. That is, the content "1" of the H register and the content "0.5" of the T register are supplied to the arithmetic circuit 5 and become "1".
×0.5'' is performed, and the result of the operation is once written to the T register and then sent to the arithmetic circuit 5 again. At the same time, the numerical code signal C 0 (4/3 = 1.3...3) from the ROM 1 is also sent to the arithmetic circuit 5. multiplication is performed. The calculation result “0.6…6” is shown in Figure 5.
The data is written to the T register as shown in (2), and the process advances to the next step S6 . Step S6 is to add the first and second terms of equation (1) above, and the contents of the S register "0.4...4" and the contents of the T register "0.6...6" are read out to the arithmetic circuit 5. will be added. and,
The addition result "1.1...1" is again written to the S register as shown in FIG. 5(2). Therefore, this S
The value of S 1 in the above equation (1) is stored in the register. The next step S7 is R
The accuracy of the integral value is determined by calculating the difference between the contents of the register and the contents of the S register that stores the current integral value, and dividing the difference by the current integral value of the contents of the S register. That is, S, R
The contents of the registers are both sent to the arithmetic circuit 5 to find the difference between the two, and further calculation is performed based on the contents of the S register. Now, the contents of the R register are shown in Figure 5 (2)
Since it is "0" as shown in FIG. 5, "1" is written in the E register as shown in FIG. 5(3). and,
In the next step S8 , it is determined whether the contents of the E register are smaller than 1.times.10.sup. -4 to determine whether the integral value has been calculated to a predetermined accuracy. The contents of the E register and the numerical code signal C 0 output from ROM 1 are sent to the arithmetic circuit 5.
(1×10 −4 ) is supplied, and a comparison judgment of size is made there. The judgment result is sent to the ROM address section 3 as a judgment signal indicating the presence or absence of data and the presence or absence of carry.
sent to. Now, the contents of the E register are shown in Figure 5 (3).
As shown in , it is "1", so it becomes "NO" and the process proceeds to the next step S9 . Step S9 determines whether the value of the division parameter stored in the N register has reached a specific value ("10"), and performs integration if the integrand function does not reach a predetermined accuracy. This is to terminate the calculation midway. As in the above step, the contents of the N register and the numerical code signal C 0 (10) are sent to the arithmetic circuit 5 and a match comparison is made. Since the content of the N register is "1" here, the process advances to the next step S10 . In step S10 , the operation of transferring the contents of the S register to the R register is performed via the arithmetic circuit 5, and as shown in FIG. 5(3), "1.1...1" is written to the R register, and the next processing Proceed to S 11 . Process S 11 executes the previous term of equation (4) above,
The contents of the T register are set to “2” from the contents of the S register.
Subtract the value divided by , and then divide it by 2. As a result, "0.38...8" is written in the S register as shown in FIG. 5(3). What to do next
At S12 , a 2N operation is performed in which the division parameter of the N register is raised to a power, and the result is written to the K register. Therefore, since the content of the N register is "1", "2" is written to the K register as shown in FIG. 5(4), and the process proceeds to the next step S13 . Step S13 adds “+1” to the contents of the N register.
By doing this, the division parameter is increased by "1", and the content of the N register becomes "2". In the next process S14 , a new step width is set by dividing the step width of the contents of the H register by "2", and the contents of the H register become "0.5", and the process proceeds to step S15 . At step S15 , "0" is written to register T and cleared. Therefore, in the next process S16 to step S20 , the above equation (3) is

【式】の演算が行 われる。先ず、処理S16ではKレジスタに記憶さ
れている累算用パラメータに対して「2K−1」
の演算が行われ、その演算結果に対してHレジス
タのきざみ幅が掛けられる。さらにその演算結果
に対してAレジスタの内容が加算される。今、K
レジスタの内容は「2」であるから“2×2−
1」の演算が行われ、そして、その演算結果
「3」とHレジスタの内容「0.5」とが乗算され
る。更にその乗算結果「1.5」とAレジスタの内
容が加算されるが、Aレジスタの内容は「0」で
あるからXレジスタの内容は第5図(5)に示すよう
に「1.5」となり、次の処理S17へ進む。処理S17
では、上記被積分関数に基づき、Xレジスタの内
容「1.5」に対する演算が行われる。その結果、
(1.5)は「0.4」となり第5図(6)に示すように
Xレジスタに書き込まれる。さらにステツプS18
では、前回までの(x)の累算値と今回の
(x)の値との加算が行われる。この時点ではT
レジスタの内容は「0」Xレジスタの内容は
「0.4」であるので、Tレジスタには「0.4」が書
き込まれる。次にステツプS19へ進み、上記Kレ
ジスタの内容の累算用パラメータに対して「−
1」の動作が行われ、ステツプS20へ進む。この
ステツプS20では上記Kレジスタの累算用パラメ
ータが「0」か否かの判断が行われる。第5図(7)
に示すようにKレジスタの内容は「1」であるか
ら、次の処理S16へ進む。処理S16ではKレジスタ
の内容「1」に対して前回同様の処理が行われ、
第5図(7)に示すように、Xレジスタには「1」が
書き込まれる。そして、処理S17乃至ステツプS19
が前回同様にして実行される。これにより第5図
(8)に示すようにKレジスタの内容が「0」とな
り、次のステツプS20では「YES」と判断されて
処理S5へ進む。処理S5では上記(3)式に於いて、累
算値に対する4/3hnの乗算が行われる。その結果、 第5図(9)に示すようにTレジスタには「0.71…
1」が書き込まれる。そしてステツプS6を経て、
ステツプS7ではEレジスタの内容は「0.01010
…」となり、更にステツプS8乃至処理S11が前述
同様に実行され、各レジスタは第5図(10)の如くな
る。しかして、処理S12では、Nレジスタの内容
「2」に対して「22」の演算が行われ、第5図
(11)に示すようにKレジスタには「4」が書き
込まれる。以下ステツプS13、処理S14、ステツプ
S15が前述同様に実行され、各レジスタは第5図
(11)に示す如くなる。さらに処理S16乃至ステツ
プS20の各処理はKレジスタの内容が「0」とな
るまで前述同様に順次実行される。 第5図(13)に示すように、Kレジスタの内容
が「0」となると処理S5、ステツプS6へと進む。
ステツプS6では今回求められたTレジスタの内容
「0.72650…」と前回までに求められたSレジスタ
の内容「0.372…」との加算が行われ、第5図
(14)に示すように「1.09872…」がSレジスタに
書き込まれる。次のステツプS3では第5図(15)
に示すようにEレジスタの内容は「1.616…×
10-3」となる。しかして、次のステツプS9ではE
レジスタの内容が「1×10-4」より大であるか
ら、ステツプS10、処理S11へと進み、各レジスタ
は第5図(15)の如くなる。そして、次の処理
S12では「23」の演算が成されてKレジスタに
「8」が書き込まれ、次のステツプS13ではNレジ
スタの内容が「+1」されて「4」となる。以
下、処理S14、ステツプS15が実行され、第5図
(16)の如くなる。さらに、処理S16乃至ステツプ
S20はKレジスタの内容が「0」となるまで循環
しながら順次実行される。 そこで、ステツプS19に於て、第5図(18)に
示す如く、Kレジスタの内容「0」となると次の
ステツプS20で「YES」と判断されて処理S5、ス
テツプS6、処理S7へ進む。この処理S7ではEレジ
スタの内容が第5図(19)の如くなる。しかし
て、次のステツプS3では上記の如くEレジスタの
内容が「9.58…×10-5」であるため、E<1×
10-4となり処理S21へ進む。処理S21ではSレジス
タに記憶されている積分値に対して有効桁のみを
取り出す処理が行なわれる。即ち、Sレジスタに
記憶されている今回演算された積分値とRレジス
タに記憶されている前回演算された積分値とを比
較し、一致した桁のみを取り出す。従つて、Sレ
ジスタの内容は第5図(20)に示すように
「1.098」となる。そして、次のステツプS22へ進
み、Sレジスタの内容がXレジスタへ転送され、
求める積分値として表示部6で表示される。 なお、上記実施例では演算精度(|S−R/S|) の値を「1×10-4」としたが、この値をもつと小
さくすれば、より精度の高い積分値が得られるこ
とは勿論である。 また、上記実施例では、シンプソンの公式を用
いたが、例えば台形公式、ポンスレーの公式等を
用いても良い。要は本発明の要旨を逸脱しない範
囲であればよく、種々の応用変形が可能である。 以上、詳細に説明した如く、本発明によれば、
前回及び今回の積分演算結果を比較することによ
り演算精度を導き出し、この演算精度が所定の精
度に達するまで順次演算を行なうように分割数を
自動的に設定するようにしたことにより、分割数
をキー入力する必要がなく積分範囲を指定するの
みで定積分演算が可能となるため、少ないキー操
作で定積分演算を行ない得ると共に演算結果も一
定の精度で得ることができる。
The calculation of [Formula] is performed. First, in process S16 , "2K-1" is set for the accumulation parameter stored in the K register.
The calculation result is multiplied by the step width of the H register. Further, the contents of the A register are added to the result of the operation. Now, K
Since the content of the register is “2”, “2×2−
Then, the operation result "3" is multiplied by the contents of the H register "0.5". Furthermore, the multiplication result "1.5" and the content of the A register are added, but since the content of the A register is "0", the content of the X register becomes "1.5" as shown in Figure 5 (5), and the following Proceed to process S17 . Processing S 17
Now, based on the above integrand function, an operation is performed on the content "1.5" of the X register. the result,
(1.5) becomes "0.4" and is written to the X register as shown in FIG. 5(6). Further step S 18
Then, the cumulative value of (x) up to the previous time and the current value of (x) are added. At this point T
Since the contents of the register are "0" and the contents of the X register are "0.4", "0.4" is written to the T register. Next, the process advances to step S19 , and the accumulation parameter of the contents of the K register is set to "-".
1 is performed, and the process advances to step S20 . In step S20 , it is determined whether the accumulation parameter of the K register is "0" or not. Figure 5(7)
As shown in the figure, the content of the K register is "1", so the process advances to the next step S16 . In process S16 , the same process as last time is performed on the content "1" of the K register,
As shown in FIG. 5(7), "1" is written to the X register. Then, processing S17 to step S19
is executed in the same way as before. As a result, Figure 5
As shown in (8), the content of the K register becomes "0", and in the next step S20 , it is determined as "YES" and the process advances to step S5 . In process S5 , the accumulated value is multiplied by 4/3 hn in the above equation (3). As a result, as shown in Figure 5 (9), the T register contains "0.71...
1" is written. Then, after step S6 ,
In step S7 , the contents of the E register are “0.01010.
. . ”, and further steps S8 to S11 are executed in the same manner as described above, and each register becomes as shown in FIG. 5(10). Therefore, in process S12 , the operation "2 2 " is performed on the content " 2 " of the N register, and "4" is written to the K register as shown in FIG. 5 (11). The following steps S13 , Processing S14 , Steps
S15 is executed in the same manner as described above, and each register becomes as shown in FIG. 5 (11). Furthermore, each process from step S16 to step S20 is sequentially executed in the same manner as described above until the contents of the K register become "0". As shown in FIG. 5 (13), when the contents of the K register become "0", the process proceeds to process S5 and step S6 .
In step S6 , the content of the T register "0.72650..." obtained this time is added to the content of the S register obtained previously "0.372...", and as shown in FIG. 5 (14), "1.09872..." is added. ...” is written to the S register. In the next step S3 , see Figure 5 (15).
As shown in the figure, the contents of the E register are “1.616…×
10 -3 ''. However, in the next step S9 , E
Since the content of the register is greater than "1×10 -4 ", the process advances to step S 10 and processing S 11 , and each register becomes as shown in FIG. 5 (15). And the next process
In step S12 , the operation ``2 3 '' is performed and ``8'' is written in the K register, and in the next step S13 , the contents of the N register are incremented by ``1'' to become ``4''. Thereafter, processing S 14 and step S 15 are executed, resulting in a process as shown in FIG. 5 (16). Furthermore, processing S16 to step
S20 is sequentially executed in a circular manner until the contents of the K register become "0". Therefore, in step S19 , as shown in FIG. 5 (18), when the content of the K register becomes "0", it is determined as "YES" in the next step S20 , and the process proceeds to step S5 , step S6 , and process. Proceed to S 7 . In this process S7 , the contents of the E register become as shown in FIG. 5 (19). However, in the next step S3 , the contents of the E register are "9.58...×10 -5 " as described above, so E<1×
10 -4 and proceeds to processing S21 . In process S21 , only significant digits are extracted from the integral value stored in the S register. That is, the currently computed integral value stored in the S register is compared with the previously computed integral value stored in the R register, and only the digits that match are extracted. Therefore, the contents of the S register are "1.098" as shown in FIG. 5 (20). Then, proceeding to the next step S22 , the contents of the S register are transferred to the X register, and
This is displayed on the display unit 6 as the desired integral value. In addition, in the above example, the value of calculation accuracy (|S-R/S|) was set to "1 x 10 -4 ", but if this value is made smaller, a more accurate integral value can be obtained. Of course. Further, in the above embodiment, Simpson's formula is used, but for example, the trapezoidal formula, Ponsley's formula, etc. may be used. In short, it is sufficient that it does not depart from the gist of the present invention, and various applications and modifications are possible. As described above in detail, according to the present invention,
The calculation accuracy is derived by comparing the previous and current integral calculation results, and the number of divisions is automatically set so that calculations are performed sequentially until the calculation accuracy reaches a predetermined accuracy. Since definite integral calculations can be performed simply by specifying an integral range without the need for key input, definite integral calculations can be performed with fewer key operations, and calculation results can be obtained with constant accuracy.

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

第1図は本発明の一実施例を示す回路ブロツク
図、第2図は第1図中RAM2のレジスタ構成
図、第3図は第1図中RAM9の被積分関数記憶
状態図、第4図は動作を説明するためのフローチ
ヤート、第5図は上記フローチヤートに伴うレジ
スタ状態図である。 1……ROM、2……RAM、3……ROMアド
レス部、4……インストラクシヨンデコーダ、5
……演算回路、7……キー入力部、9……
RAM。
FIG. 1 is a circuit block diagram showing an embodiment of the present invention, FIG. 2 is a register configuration diagram of RAM 2 in FIG. 1, FIG. 3 is a storage state diagram of an integrand function in RAM 9 in FIG. 1, and FIG. is a flowchart for explaining the operation, and FIG. 5 is a register state diagram accompanying the above flowchart. 1...ROM, 2...RAM, 3...ROM address section, 4...instruction decoder, 5
...Arithmetic circuit, 7...Key input section, 9...
RAM.

Claims (1)

【特許請求の範囲】[Claims] 1 被積分関数を記憶する第1の記憶手段と、外
部入力された定積分範囲を分割数に応じて複数に
分割する分割手段と、上記記憶手段に記憶されて
いる被積分関数を順次読み出す読出手段と、該読
出手段から読み出された被積分関数に基づき上記
分割手段で分割された分割範囲毎に順次積分演算
を行なう演算手段と、該演算手段で今回及び前回
算出された積分値を記憶する第2の記憶手段と、
該第2の記憶手段に記憶されている今回及び前回
算出された積分値に従つて演算精度を算出する精
度算出手段と、該精度算出手段で算出された精度
が所定値に達したか否かを検出する検出手段とを
具備し、該検出手段で積分値が所定の精度に達し
たことが検出されるまで上記分割手段の分割数を
順次増加させながら積分演算を行なうことを特徴
とする積分演算機能を有する小型電子式計算機。
1. A first storage means for storing an integrand, a dividing means for dividing an externally input definite integral range into a plurality of parts according to the number of divisions, and a readout for sequentially reading out the integrand stored in the storage means. means, a calculation means for sequentially performing an integral calculation for each divided range divided by the division means based on the integrand read out from the reading means, and storing integral values calculated this time and last time by the calculation means. a second storage means for
Accuracy calculation means for calculating calculation accuracy according to the current and previous calculated integral values stored in the second storage means, and whether or not the accuracy calculated by the accuracy calculation means has reached a predetermined value. and a detecting means for detecting, and performing an integral operation while sequentially increasing the number of divisions of the dividing means until the detecting means detects that the integral value has reached a predetermined accuracy. A small electronic calculator with arithmetic functions.
JP5009080A 1980-04-15 1980-04-15 Minicomputer having integral operation function Granted JPS56147240A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP5009080A JPS56147240A (en) 1980-04-15 1980-04-15 Minicomputer having integral operation function
GB8110834A GB2073922B (en) 1980-04-15 1981-04-07 Calculator having integrating function
US06/252,944 US4398263A (en) 1980-04-15 1981-04-10 Calculator having integrating function
DE19813115268 DE3115268A1 (en) 1980-04-15 1981-04-15 CALCULATOR WITH INTEGRATION FUNCTION
HK654/89A HK65489A (en) 1980-04-15 1989-08-17 Calculator having integrating function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5009080A JPS56147240A (en) 1980-04-15 1980-04-15 Minicomputer having integral operation function

Publications (2)

Publication Number Publication Date
JPS56147240A JPS56147240A (en) 1981-11-16
JPS6131891B2 true JPS6131891B2 (en) 1986-07-23

Family

ID=12849338

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5009080A Granted JPS56147240A (en) 1980-04-15 1980-04-15 Minicomputer having integral operation function

Country Status (1)

Country Link
JP (1) JPS56147240A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03118696U (en) * 1990-03-20 1991-12-06

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5426635A (en) * 1977-07-29 1979-02-28 Sharp Corp Electronic desk calculator with function of definite integral

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03118696U (en) * 1990-03-20 1991-12-06

Also Published As

Publication number Publication date
JPS56147240A (en) 1981-11-16

Similar Documents

Publication Publication Date Title
US4172287A (en) General purpose data processing apparatus for processing vector instructions
US4301511A (en) Programmable calculator with a device for controlling the reading of program data
JPH0145649B2 (en)
JPS62191926A (en) Arithmetic unit
JPS6131891B2 (en)
US4398263A (en) Calculator having integrating function
JPS6132685B2 (en)
US3508037A (en) Decimal add/subtract circuitry
US4761750A (en) Electronic calculator with a program calculation function
US4409668A (en) Round-off apparatus for data processors
JP3252493B2 (en) Electronic calculator and its calculation processing method
JPH07146777A (en) Arithmetic unit
JP2985093B2 (en) Arithmetic control unit
JP4193773B2 (en) Arithmetic control device and program
JPS642179Y2 (en)
JPS5940665Y2 (en) Power calculation control device
JP2985965B2 (en) Factorization device
JPH021627Y2 (en)
JP4428778B2 (en) Arithmetic device, arithmetic method, and computing device
JPH0117174B2 (en)
JPH0429961B2 (en)
JPS62102351A (en) Electronic calculator
JPS61138332A (en) Digital operating circuit
JPH06180640A (en) Device and method for division
JPS6033629A (en) Operating device