JPH0214728B2 - - Google Patents

Info

Publication number
JPH0214728B2
JPH0214728B2 JP62003446A JP344687A JPH0214728B2 JP H0214728 B2 JPH0214728 B2 JP H0214728B2 JP 62003446 A JP62003446 A JP 62003446A JP 344687 A JP344687 A JP 344687A JP H0214728 B2 JPH0214728 B2 JP H0214728B2
Authority
JP
Japan
Prior art keywords
data
register
integer
calculation
reciprocal
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 - Lifetime
Application number
JP62003446A
Other languages
Japanese (ja)
Other versions
JPS62271018A (en
Inventor
Junichi Yoshida
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 JP344687A priority Critical patent/JPS62271018A/en
Publication of JPS62271018A publication Critical patent/JPS62271018A/en
Publication of JPH0214728B2 publication Critical patent/JPH0214728B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Calculators And Similar Devices (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 この発明は、xyおよびx1/yの演算方式に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to an arithmetic method for x y and x 1/y .

〔従来技術とその問題点〕[Prior art and its problems]

一般に関数計算用の小型電子式計算機には、数
値xと数値yを入力してxyあるいはx1/yの計算を
行う機能が備えられている。そして、この種の小
型電子式計算機では、上記数値yがその逆数を作
成することにより整数となるような小数である場
合にも、数値yを小数としてxyあるいはx1/yの演
算ループを使用して答を得ていた。
Generally, small electronic calculators for calculating functions are equipped with the function of inputting a numerical value x and a numerical value y to calculate x y or x 1/y . In this type of small electronic calculator, even if the above-mentioned number y is a decimal number that becomes an integer by creating its reciprocal, the calculation loop of x y or x 1/y is performed using the number y as a decimal number. I used it to get the answer.

しかしながら、上記xyおよびx1/yの演算は、数
値yが小数の場合、数値yが整数である場合に比
して演算精度が劣るものであり、上述したよう
に、数値yがその逆数を作成して整数となるよう
な小数である場合、数値yを小数としてxyあるい
はx1/yを演算した答と、上記数値yの逆数である
整数を数値yとしてxyをx1/yにあるいはx1/yをxy
に置換えて演算した答とが異なる場合があつた。
However, when the numerical value y is a decimal number, the calculation precision of the above-mentioned x y and x 1/y is lower than when the numerical value y is an integer, and as mentioned above, the numerical value y is its reciprocal. If it is a decimal that becomes an integer by creating an integer, the answer of calculating x y or x 1/y with the value y as a decimal, and the integer that is the reciprocal of the above value y as the value y, x y is x 1/ y or x 1/y to x y
In some cases, the answer calculated by replacing

一方、上記小型電子式計算機は、xが負数の場
合は答が虚数となる場合があるためにエラーとし
て処理していた。
On the other hand, the above-mentioned small electronic calculator treats the case where x is a negative number as an error because the answer may be an imaginary number.

しかしながら、xyにおいてxが負数であつても
yが整数の場合は答が存在し、またx1/yにおいて
yが奇数の場合すなわち負数の奇数乗根には少な
くとも1つの実根が存在するものであり、従来の
小型電子式計算機ではこれらの答を得ることがで
きないという欠点があつた。
However, even if x is a negative number in x y , an answer exists if y is an integer, and if y is an odd number in x 1/y , that is, at least one real root exists in the odd root of a negative number. However, conventional small electronic calculators have the disadvantage of not being able to obtain these answers.

このような欠点を解決するための手段として、
数値yが整数あるいは奇数であるか否かを判断す
る判断手段を設け、該判断手段により数値yが整
数あるいは奇数であると判断された場合には、数
値xが負数であつてもxyの答、あるいはx1/yの実
根を求め得る演算方式が考えられる。
As a means to solve these shortcomings,
A judgment means is provided to judge whether the numerical value y is an integer or an odd number, and when the judgment means determines that the numerical value y is an integer or an odd number, even if the numerical value x is a negative number, x y An arithmetic method that can find the answer or the real root of x 1/y can be considered.

しかしながら、上記のような演算方式が従来の
小型電子式計算機を基に実施された場合にあつて
も、数値yが小数である場合には、エラーとして
処理されてしまい、実際には数値yが小数であつ
ても、その逆数が整数である場合には、その逆数
を数値yに入力しxyをx1/y、x1/yをxyに置換えて
演算を行なうことにより実数値が得られる可能性
があるにも拘わらず、このような答を得ることが
できないという欠点を有していた。
However, even if the calculation method described above is implemented based on a conventional small electronic calculator, if the number y is a decimal, it will be treated as an error, and the number y will actually be Even if it is a decimal number, if its reciprocal is an integer, input the reciprocal into the number y, replace x y with x 1/y , and x 1/y with x y , and perform the calculation to obtain a real number. Although it is possible to obtain such an answer, it has the drawback of not being able to obtain such an answer.

〔発明の目的〕[Purpose of the invention]

この発明は、上記の事情に鑑み、xyあるいは
x1/yの演算を行う際に、数値yが小数であつてそ
の逆数が整数となる場合にあつては、精度の高い
演算を行うとともに、xが負数である場合にyが
整数あるいは奇数であるかを判断し実数値の答を
得るようにした場合にあつても、適用でき得るよ
うにした演算方式を提供することを目的としたも
のである。
In view of the above circumstances, this invention provides x y or
When calculating x 1/y , if the number y is a decimal and its reciprocal is an integer, the calculation is performed with high precision, and if x is a negative number, y is an integer or an odd number. The purpose of this invention is to provide an arithmetic method that can be applied even when determining whether or not the answer is a real value.

〔発明の要点〕[Key points of the invention]

この発明は、上述した目的を達成するために、
xyあるいはx1/yの演算指定時に、データyが整数
か否かを判断し、整数ではないと判断された場合
には上記データyの逆数を作成しその逆数が整数
か否かを判断し、上記逆数が整数である場合には
その逆数をデータyとし、xyの演算指定時には
x1/yの演算を、またx1/yの演算指定時にはxyの演
算を行うようにしたことを要点とする。
In order to achieve the above-mentioned object, this invention
When specifying the operation of x y or x 1/y , determine whether the data y is an integer or not. If it is determined that it is not an integer, create the reciprocal of the above data y and determine whether the reciprocal is an integer. However, if the above reciprocal is an integer, the reciprocal is used as data y, and when specifying the operation of x y ,
The main point is that the calculation of x 1/y is performed, and when the calculation of x 1/y is specified, the calculation of x y is performed.

〔実施例〕〔Example〕

以下、図面を参照してこの発明の一実施例につ
き説明する。第1図において10はテンキー10
1、+,−,×,÷等のフアンクシヨンキー102の
他に、フアンクシヨンキーの一種ではあるがxy
求めるキー103、x1/yを求めるキー104及び
イコールキー105を備えたキーボードである。
このキーボード10は制御部11から入力される
タイミング信号を基に操作されたキーのキーコー
ドを作成して制御部11へ送出すると共に、入力
セレクタ12を介してRAM13へ送出する。入
力セレクタ12は種々の入力信号の中から制御部
11に指示された信号を選択して上記RAM13
に供給する回路である。また、RAM13はxy
るいはx1/yにおけるデータxあるいは表示データ
を記憶するXレジスタ131、データyを記憶す
るYレジスタ132、補助用のY′レジスタ13
3、演算の命令コードを記憶するFレジスタ13
4、カウンタとして使用されるCレジスタ13
5、サインフラグを記憶するSレジスタ136及
び図示しない演算用のレジスタから成つている。
なお、xs,ys,y′sは正負を示すサインフラグを記
憶するサイン桁で、負数のときサインフラグは
「1」となる。このRAM13のアドレス及び読
出し/書込み指定は上記制御部11によつて成さ
れるもので、このRAM13の内容は制御部11
に制御される出力セレクタ14にてどのレジスタ
の内容をどこへ出力するかが選択され、演算回路
15、絶対値作成回路16、逆数作成回路17及
び判断回路18に出力される。また、上記Xレジ
スタ131の内容は上記出力セレクタ14を介し
て図示しない表示部へ送出され表示される。上記
演算回路15は制御部11から制御信号aが印加
された時にXレジスタ131に記憶されているデ
ータx、Yレジスタ132に記憶されているデー
タy及びFレジスタ134に記憶されているxy
るいはx1/yの命令コードを読込んでxyあるいは
x1/yの演算を行なう回路で、その演算結果は入力
セレクタ12を介してRAM13のXレジスタ1
31に入力される。また他の演算を指定する命令
コードが入力された時には、その命令コードに応
じた演算を行なう。上記絶対値作成回路16は制
御部11から制御信号bが印加された時に、入力
されたデータの絶対値を作成する回路である。上
記逆数作成回路17は、制御部11から制御信号
Cが印加された時に、入力されたデータの逆数を
作成する回路である。また、上記判断回路18
は、制御部11から供給される制御信号に応じて
入力されたデータのの整数/小数判断、正数/負
数判断、奇数/偶数判断、xy指定かx1/y指定かの
判断等の各種判断処理を行ない、その判断結果を
制御部11へ送出する。なお、この制御部11は
システム全体を制御するもので、キーボード10
から入力されたキーコードを判断して各回路に制
御信号を送出すると共に、全体のタイミング制御
を行なう。
Hereinafter, one embodiment of the present invention will be described with reference to the drawings. In Figure 1, 10 is the numeric keypad 10
In addition to function keys 102 such as 1, +, -, ×, ÷, etc., the keyboard is equipped with a key 103 for calculating x y , which is a type of function key, a key 104 for calculating x 1/y , and an equal key 105. It is.
This keyboard 10 creates a key code for the operated key based on the timing signal input from the control section 11 and sends it to the control section 11 and also sends it to the RAM 13 via the input selector 12. The input selector 12 selects a signal instructed by the control unit 11 from among various input signals and outputs the signal to the RAM 13.
This is a circuit that supplies The RAM 13 also includes an X register 131 that stores data x or display data at x y or x 1/y , a Y register 132 that stores data y, and an auxiliary Y' register 13
3. F register 13 that stores the operation instruction code
4. C register 13 used as a counter
5. It consists of an S register 136 for storing a sign flag and an arithmetic register (not shown).
Note that x s , y s , and y′ s are sign digits that store sign flags indicating positive or negative, and when they are negative numbers, the sign flag becomes “1”. The address and read/write designation of this RAM 13 are made by the control section 11, and the contents of this RAM 13 are specified by the control section 11.
The output selector 14 controlled by the output selector 14 selects which register's contents are to be output to which, and outputs them to the arithmetic circuit 15, the absolute value generation circuit 16, the reciprocal number generation circuit 17, and the judgment circuit 18. Further, the contents of the X register 131 are sent to a display section (not shown) via the output selector 14 and displayed. When the control signal a is applied from the control unit 11, the arithmetic circuit 15 calculates the data x stored in the X register 131, the data y stored in the Y register 132, the data x y stored in the F register 134, or Read the x 1/y instruction code and execute x y or
This is a circuit that performs the calculation x 1/y , and the calculation result is sent to the X register 1 of the RAM 13 via the input selector 12.
31. Furthermore, when an instruction code specifying another operation is input, the operation according to the instruction code is performed. The absolute value creation circuit 16 is a circuit that creates the absolute value of input data when the control signal b is applied from the control section 11. The reciprocal number creation circuit 17 is a circuit that creates a reciprocal number of input data when the control signal C is applied from the control unit 11. Further, the judgment circuit 18
Input data is determined according to the control signal supplied from the control unit 11 as an integer/decimal number, positive/negative number, odd/even number, x y designation or x 1/y designation, etc. It performs various judgment processes and sends the judgment results to the control section 11. Note that this control unit 11 controls the entire system, and the keyboard 10
It judges the input key code and sends control signals to each circuit, and also performs overall timing control.

次に、上記の様に構成されたこの実施例の動作
を、第2図のフローチヤートを参照して説明す
る。
Next, the operation of this embodiment configured as described above will be explained with reference to the flowchart of FIG.

まず、xyあるいはx1/yの計算を行なうにあたつ
ては、キーボード10のテンキー101よりxの
データを置数し、次にxyキー103あるいはx1/y
キー104を操作する。そしてテンキー101よ
りyのデータを置数した後、イコールキー105
を操作する。キーボード10から出力されたデー
タxは入力セレクタ12を介してRAM13のX
レジスタ131に書込まれる。このとき制御部1
1からは入力セレクタ12に対しキーボード10
からの信号を選択させる制御信号が与えられ、
RAM13に対しXレジスタ131のアドレスを
指定し更に書込みを指定する制御信号が与えられ
る。また、キーボード10から出力されたデータ
yは同様にしてYレジスタ132に書込まれ、xy
あるいはx1/yの命令コードはFレジスタ134に
書込まれる。しかして、イコールキー105を操
作することによつて制御部11はその操作信号を
読取り、第2図のフローをスタートさせる。ステ
ツプS1ではRAM13内のCレジスタ135及び
Sレジスタ136をクリアする。RAM13内の
レジスタをクリアする場合は、入力セレクタ12
のゲートをすべて閉じ、RAM13の所定のアド
レスを指定して書込みを行なえばよい。次にステ
ツプS2では、Yレジスタ132に書込まれている
データyを出力セレクタ14を介して判断回路1
8へ読出し、整数であるか小数であるかの判断を
行なう。その判断結果が整数であれば制御部11
はステツプS9の制御を行ない、小数であればステ
ツプS3の制御を行なう。このステツプS3以降の動
作は、小数であるデータyの逆数をとることによ
つて整数になる可能性をチエツクするものであ
る。すなわち、ステツプS3ではFレジスタ134
に書込まれている演算の命令コードを判断回路1
8が読込んでxy指定であるかx1/y指定であるかを
判断する。その判断結果がxyであればステツプS4
を実行してx1/yの命令コードを制御部11からF
レジスタ134に書込み、x1/yであればステツプ
S5を実行してxyの命令コードをFレジスタ134
に書込むことによつて、Fレジスタ134内の演
算の命令コードについてxyとx1/yの交換を行な
う。次にステツプS6において、制御部11は
RAM13のCレジスタ135のアドレスを指定
してインクリメント指令を与え、Cレジスタ13
5の内容をインクリメントさせた後、判断回路1
8に読出してその内容を判断する。そして内容が
「1」であればステツプS7へ進み「2」であれば
ステツプS8へ進むが、初めにCレジスタ135は
クリアされているので、第1回目はステツプS7
進む。ここでは、Yレジスタ132内のデータy
を一旦Y′レジスタ133へセイブした後、Yレ
ジスタ132内のデータyを逆数作成回路17へ
送出してデータyの逆数を作成し、得られたデー
タ1/yをYレジスタ132に書込む。そして上
述のステツプS2へ戻つて再びYレジスタ132の
内容が整数であるか小数であるかの判断を行な
う。すなわち、データyを逆数1/yに変換する
と共に演算の命令コードxyとx1/yを入れかえれば
元の演算と等価であるから、小数であつたデータ
yを逆数にすることによつて整数になるか否かの
チエツクが可能となるわけである。上記ステツプ
S2で再度の整数/小数判断を行なうことによつて
整数であることが判断されればステツプS9へ進む
が、まだ小数のままであれば上記ステツプS3及び
S4あるいはS5を実行してFレジスタ134内の命
令コードを元の命令コードに戻す。そしてステツ
プS6でCレジスタ135の内容をインクリメント
した後判断回路18で判断し、今回はCの内容が
「2」となることによつてステツプS8に進みY′レ
ジスタ133にセイブされていたデータyをYレ
ジスタ132に戻すものである。そしてステツプ
S10にて演算が行なわれるもので、本実施例にお
いてはxyあるいはx1/yにおいてデータyが小数で
あつて逆数にしても整数とならない場合は従来同
様の演算を行なう。すなわち、xが負数であれば
エラーとなる。このステツプS10の演算は、RAM
13から出力セレクタ14を介してXレジスタ1
31、Yレジスタ132、Fレジスタ134の内
容が各々演算回路15に供給され、Fレジスタ1
34内の命令コードに基づいて演算を行ない、演
算結果を入力セレクタ12を介してXレジスタ1
31に入力する。
First, when calculating x y or x 1/y , enter the x data using the numeric keypad 101 of the keyboard 10, then press the x y key 103 or x 1/y
Operate key 104. After entering the y data using the numeric keypad 101, press the equal key 105.
operate. The data x output from the keyboard 10 is sent to the RAM 13 via the input selector 12.
Written to register 131. At this time, the control unit 1
1 to input selector 12 and keyboard 10
a control signal is provided that causes the selection of a signal from
A control signal is applied to the RAM 13 to designate the address of the X register 131 and to designate writing. Further, the data y output from the keyboard 10 is similarly written to the Y register 132, and x y
Alternatively, the x 1/y instruction code is written to the F register 134. When the equal key 105 is operated, the control section 11 reads the operation signal and starts the flow shown in FIG. 2. In step S1 , the C register 135 and S register 136 in the RAM 13 are cleared. When clearing the register in RAM13, input selector 12
It is sufficient to close all the gates of , designate a predetermined address in the RAM 13, and perform writing. Next, in step S2 , the data y written in the Y register 132 is sent to the judgment circuit 1 via the output selector 14.
8 and determines whether it is an integer or a decimal. If the judgment result is an integer, the control unit 11
If the number is a decimal , control is performed at step S3 . The operations after step S3 are to check the possibility that the data y becomes an integer by taking the reciprocal of the decimal number y. That is, in step S3 , the F register 134
Circuit 1 determines the operation instruction code written in
8 reads and determines whether it is x y specification or x 1/y specification. If the judgment result is x y , step S 4
Execute x 1/y instruction code from control unit 11 to F
Write to register 134, if x 1/y , step
Execute S 5 and store the x y instruction code in F register 134.
By writing to , the instruction code of the operation in the F register 134 is exchanged between x y and x 1/y . Next, in step S6 , the control section 11
Specify the address of the C register 135 of the RAM 13, give an increment command, and
After incrementing the contents of 5, judgment circuit 1
8 and judge its contents. If the content is "1", the process goes to step S7 , and if it is "2", the process goes to step S8 ; however, since the C register 135 is cleared first, the process goes to step S7 the first time. Here, the data y in the Y register 132
After temporarily saving the data y in the Y' register 133, the data y in the Y register 132 is sent to the reciprocal number creation circuit 17 to create the reciprocal of the data y, and the obtained data 1/y is written in the Y register 132. Then, the process returns to the above-mentioned step S2 , and it is again determined whether the contents of the Y register 132 are an integer or a decimal. In other words, if you convert the data y to the reciprocal number 1/y and replace the operation instruction codes x y and x 1/y , it is equivalent to the original operation, so by converting the data y that was a decimal number to the reciprocal number Therefore, it is possible to check whether the value is an integer or not. Above steps
If it is determined that it is an integer by performing the integer/decimal judgment again in S2 , the process proceeds to step S9 , but if it is still a decimal, the process proceeds to step S3 and step S3 .
Execute S4 or S5 to return the instruction code in the F register 134 to the original instruction code. After incrementing the contents of the C register 135 in step S6 , the judgment circuit 18 makes a judgment, and this time, as the contents of C become "2", the process advances to step S8 and is saved in the Y' register 133. The data y is returned to the Y register 132. and step
The calculation is performed in S10 , and in this embodiment, if the data y in x y or x 1/y is a decimal and does not become an integer even if it is reciprocated, the same calculation as in the conventional case is performed. That is, if x is a negative number, an error will occur. This step S 10 calculation is executed in RAM
13 to X register 1 via output selector 14
31, the contents of the Y register 132 and the F register 134 are each supplied to the arithmetic circuit 15, and the contents of the F register 1
The operation is performed based on the instruction code in 34, and the operation result is sent to the X register 1 via the input selector 12.
31.

一方、データyが整数の時はステツプS9にてデ
ータxの正負を判別する。すなわち判断回路18
はXレジスタ131の内容を読込んで判断し、正
であれば何等問題は生じないのでステツプS10
進み従来通りの演算を行なう。また、データxが
負の場合は、ステツプS11へ進み、判断回路18
はデータyが奇数であるか偶数であるかの判断を
行なう。その判断結果が偶数であればステツプ
S12に進み更にFレジスタ134に記憶されてい
る命令コードがxyかx1/yであるかを判断しx1/y
あると判断された時はそのままステツプS10へ進
み従来通りの演算が行なわれる。すなわちx1/y
おいてxが負でありyが奇数でなければエラーと
なる。またステツプS11においてデータyが奇数
と判断されるとSレジスタ136に制御部11か
ら「1」を書込み、次のステツプS14でXレジス
タ131からデータxを絶対値作成回路16へ送
出して絶対値を作成し再びXレジスタ131へ書
込む。また上記ステツプS12でFレジスタ134
に記憶されている命令コードがxyと判断されたと
きも上記ステツプS14が実行される。従つて、次
のステツプS10ではデータxの絶対値|x|に対
して演算が実行されることになり、データxが負
であつてもエラーとなることはない。演算終了後
に実行されるステツプS15では、Sレジスタ13
6の内容をXレジスタ131のサイン桁に書込
む。すなわち、上記ステツプS14にてデータxの
絶対値をとつた場合にはステツプS13にてSレジ
スタ136に「1」が書込まれているので、ここ
で再びデータxに負号をつけることができる。な
お他の場合はSレジスタ136の内容は「0」の
ままであるから問題はない。しかして、Xレジス
タ131内に書込まれた演算結果が出力セレクタ
14を介して図示しない表示部へ送られ表示され
るものである。
On the other hand, when the data y is an integer, it is determined in step S9 whether the data x is positive or negative. That is, the judgment circuit 18
is determined by reading the contents of the X register 131, and if it is positive, no problem will occur, so the process proceeds to step S10 and performs the conventional calculation. Further, if the data x is negative, the process advances to step S11 , and the judgment circuit 18
determines whether the data y is an odd number or an even number. If the judgment result is an even number, step
The process advances to step S12 , and it is further determined whether the instruction code stored in the F register 134 is x y or x 1/y. If it is determined that it is x 1/y , the process directly advances to step S10, where the instruction code stored in the F register 134 is An operation is performed. In other words, if x is negative and y is not an odd number in x 1/y , an error will occur. If data y is determined to be an odd number in step S11 , "1" is written from the control unit 11 to the S register 136, and in the next step S14 , data x is sent from the X register 131 to the absolute value generation circuit 16. An absolute value is created and written to the X register 131 again. Also, in step S12 above, the F register 134
The above step S14 is also executed when it is determined that the instruction code stored in is xy . Therefore, in the next step S10 , an operation is performed on the absolute value |x| of the data x, and even if the data x is negative, no error will occur. In step S15 executed after the calculation is completed, the S register 13 is
6 is written to the sign digit of the X register 131. That is, when the absolute value of the data x is taken in step S14 , "1" is written in the S register 136 in step S13 , so it is necessary to add a negative sign to the data x again here. Can be done. Note that in other cases, the contents of the S register 136 remain "0", so there is no problem. Thus, the calculation result written in the X register 131 is sent to a display section (not shown) via the output selector 14 and displayed.

〔効果〕〔effect〕

以上詳細に説明したように、この発明によれ
ば、xyあるいはx1/yの演算指定時に、データyが
小数である場合その逆数が整数であるか否かを判
断し、上記逆数が整数である場合にはその逆数を
データyとし、xyの演算指定時にx1/yの演算を、
x1/yの演算指定時にはxyの演算を行うようにした
から、例えば1/0.5のように実質的に整数であつ
ても表現形態が違うため小数となつているような
データに対する演算精度を向上させることができ
るとともに、xが負数である場合にyが整数ある
いは奇数であるか判断し実数値の答を得るように
した場合にあつても、十分適用でき得る等の利点
を有する。
As explained in detail above, according to the present invention, when specifying the operation of x y or x 1/y , if the data y is a decimal, it is determined whether the reciprocal is an integer, and the reciprocal is determined to be an integer. If , the reciprocal is data y, and when specifying the operation of x y , the operation of x 1/y is
When specifying the calculation of x 1/y , the calculation of x y is performed, so the calculation precision for data such as 1/0.5, which is actually an integer but is expressed as a decimal number due to a different representation format, can be improved. In addition, it has the advantage that it can be fully applied even when x is a negative number and y is determined to be an integer or an odd number to obtain a real-valued answer.

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

第1図はこの発明の一実施例を説明する回路構
成図、第2図はこの発明の動作を説明するフロー
チヤートである。 10……キーボード、13……RAM、15…
…演算回路、16……絶対値作成回路、17……
逆数作成回路、18……判断回路。
FIG. 1 is a circuit diagram illustrating an embodiment of the present invention, and FIG. 2 is a flowchart illustrating the operation of the present invention. 10...Keyboard, 13...RAM, 15...
... Arithmetic circuit, 16 ... Absolute value creation circuit, 17 ...
Reciprocal number creation circuit, 18...judgment circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 データx及びデータyに対するxyおよびx1/y
の演算機能を備えた演算手段と、データyが整数
であるか否かを判断する判断手段と、この判断手
段によりデータyが整数でないと判断された場合
に該データyの逆数1/yを作成する逆数作成手
段と、上記逆数作成手段により作成されたデータ
1/yを上記判断手段に入力する手段とを備え、
この判断手段により上記データ1/yが整数と判
断された場合は、データ1/yをデータyに置き
換え、xyの演算指定時にx1/yの演算を行ない、
x1/yの演算指定時にxyの演算を行なうようにした
ことを特徴とする演算方式。
1 x y and x 1/y for data x and data y
a calculation means having a calculation function, a determination means for determining whether the data y is an integer, and a reciprocal 1/y of the data y when the determination means determines that the data y is not an integer. and means for inputting data 1/y created by the reciprocal number creation means to the determination means,
If this judgment means determines that the data 1/y is an integer, replace the data 1/y with data y, perform the calculation of x 1/y when specifying the calculation of x y ,
An arithmetic method characterized in that when an arithmetic operation of x 1/y is specified, an arithmetic operation of x y is performed.
JP344687A 1987-01-09 1987-01-09 Arithmetic system Granted JPS62271018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP344687A JPS62271018A (en) 1987-01-09 1987-01-09 Arithmetic system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP344687A JPS62271018A (en) 1987-01-09 1987-01-09 Arithmetic system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP5009180A Division JPS56147241A (en) 1980-04-15 1980-04-15 Operation system

Publications (2)

Publication Number Publication Date
JPS62271018A JPS62271018A (en) 1987-11-25
JPH0214728B2 true JPH0214728B2 (en) 1990-04-09

Family

ID=11557565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP344687A Granted JPS62271018A (en) 1987-01-09 1987-01-09 Arithmetic system

Country Status (1)

Country Link
JP (1) JPS62271018A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5124144A (en) * 1974-12-13 1976-02-26 Sharp Kk DENSHISHIKITAKUJOKEISANKI
JPS5168142A (en) * 1974-12-10 1976-06-12 Sharp Kk SHISUKAN SUKEISANKI
JPS5331928A (en) * 1976-09-06 1978-03-25 Sharp Corp Calculator

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5168142A (en) * 1974-12-10 1976-06-12 Sharp Kk SHISUKAN SUKEISANKI
JPS5124144A (en) * 1974-12-13 1976-02-26 Sharp Kk DENSHISHIKITAKUJOKEISANKI
JPS5331928A (en) * 1976-09-06 1978-03-25 Sharp Corp Calculator

Also Published As

Publication number Publication date
JPS62271018A (en) 1987-11-25

Similar Documents

Publication Publication Date Title
JPH0792789B2 (en) Graph display device
JPS609293B2 (en) Key input control method
US4410956A (en) Exponential operation device
JPH0214728B2 (en)
US4519045A (en) Electronic data processing apparatus with equation operating system having improved unary operation implementation
JP3498323B2 (en) Electronic calculator and arithmetic processing method
US4495592A (en) Electronic data processing apparatus with equation operating system having implied multiplication of two hierarchical ranks
JPH0421151Y2 (en)
JPH021627Y2 (en)
JPH01158556A (en) Device for setting operational mode of electronic calculator
EP0729105A1 (en) Computer with a check function
US4651295A (en) Electronic desk-top calculator
JPS6227930Y2 (en)
JP2560344Y2 (en) Small electronic calculator
JPS6037634Y2 (en) calendar printing device
JPS59187201A (en) Electronic scale
JPS6113623B2 (en)
JPH10260941A (en) Computer
JPH04128349U (en) small electronic calculator
JPH07319822A (en) Minicomputer with checking function
JPS6315958Y2 (en)
JPS6127772B2 (en)
JPH082749Y2 (en) Multifunction calculator
JPS6033481Y2 (en) small electronic calculator
JPH0661054B2 (en) input method