JP5895021B2 - Calculator and program - Google Patents
Calculator and program Download PDFInfo
- Publication number
- JP5895021B2 JP5895021B2 JP2014102952A JP2014102952A JP5895021B2 JP 5895021 B2 JP5895021 B2 JP 5895021B2 JP 2014102952 A JP2014102952 A JP 2014102952A JP 2014102952 A JP2014102952 A JP 2014102952A JP 5895021 B2 JP5895021 B2 JP 5895021B2
- Authority
- JP
- Japan
- Prior art keywords
- remainder
- quotient
- input
- key
- calculation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、剰余を扱った計算を処理できる計算機に関する。 The present invention relates to a computer capable of processing a calculation that handles a remainder.
一般的な計算機で除算(被除数÷除数)を行う場合、その解(商)は、割り切れるときには整数で、割り切れないときには小数で表示される。除算の解を整数(整商)のみで表すときには、端数を剰余(あまり)として解を表現するが、一般的な計算機では、剰余は表示されない。そこで、教育用の計算機として、剰余表示機能を有する電卓(例えば、カシオ計算機株式会社製、型番:AZ−60F等)が販売されており、これに関連する技術が開示されている(例えば特許文献1を参照)。また、剰余を表示させる技術も開示されている(例えば特許文献2を参照)。 When division (dividend / divisor) is performed by a general computer, the solution (quotient) is displayed as an integer when divisible, and as a decimal when not divisible. When the solution of division is expressed only by an integer (integer quotient), the solution is expressed by using a fraction as a remainder (too much), but the remainder is not displayed on a general computer. Therefore, calculators having a surplus display function (for example, Casio Computer Co., Ltd., model number: AZ-60F, etc.) are sold as educational computers, and related technologies are disclosed (for example, patent documents). 1). In addition, a technique for displaying a remainder is also disclosed (see, for example, Patent Document 2).
薬局においては、PTP(press through pack)包装された錠剤やカプセル剤、ヒート包装の粉薬など薬剤の計数調剤の際に、しばしば割り切れない除算を行い、さらに剰余を再度使った計算を行う場面がある。例えば、ある薬剤X(ヒート包装)は、1箱に42包、(3連包が14組)入りであるとする。この薬剤を、医師により100包処方されたとする。薬局では、市販の薬剤とは異なり、医師の処方された数の薬剤を正確に処方しなければならないが、処方される数は、患者の年齢や症状、あるいは薬の用法用量等によって異なるため、処方箋を確認して、数を計算する必要がある。そこで、100包を作り出すために、一般の電卓を使って計算(小数表示のもの)すると、下記のような3つの手順をとる。 In pharmacies, when counting and dispensing pharmaceuticals such as PTP (press through pack) -packed tablets and capsules, heat-packed powders, etc., there are often scenes where division that cannot be divided is performed and the remainder is used again. . For example, it is assumed that a certain medicine X (heat packaging) contains 42 packages (14 sets of 3 consecutive packages) in one box. Assume that this medicine is prescribed 100 packs by a doctor. Unlike over-the-counter drugs, pharmacies must accurately prescribe the number of medicines prescribed by the doctor, but the number prescribed depends on the age and symptoms of the patient, the dosage of the drug, etc. You need to check the prescription and calculate the number. Therefore, in order to produce 100 packets, when a calculation is performed using a general calculator (with decimal display), the following three procedures are taken.
まず、必要な箱数を求めるべく100÷42を計算し、商として2.38095・・・を得る。これにより、2箱では不足するが、3箱では多すぎることがわかる。次に、100−42×2を計算し、2箱準備した時の不足数として16を得る。さらに、必要な3連包の組数を求めるべく16÷3を計算し5.33333・・・を得る。これにより、5組では不足するが、6組では多すぎることがわかる。次に、個別の包数を求めるべく16−3×5=16−15を計算し、1を得る。以上の計算の結果として、100包を準備するために、2箱と3連包が5個と個別包を1包準備すればよいことがわかる。 First, 100 ÷ 42 is calculated to obtain the necessary number of boxes, and 2.38095... Is obtained as a quotient. As a result, it is understood that two boxes are insufficient, but three boxes are too many. Next, 100-42 × 2 is calculated, and 16 is obtained as the shortage when two boxes are prepared. Further, 16 ÷ 3 is calculated to obtain the required number of triplets, and 5.33333. This shows that 5 sets are insufficient, but 6 sets are too much. Next, 16−3 × 5 = 16−15 is calculated to obtain the individual number of packages, and 1 is obtained. As a result of the above calculation, it can be seen that in order to prepare 100 packets, it is only necessary to prepare 2 packages, 5 consecutive packages and 5 individual packages.
また、実際に100包をつくる場合には、計算の速さや在庫数量を考慮して前述のような積み上げ計算ではなく、一箱多いところから引く計算をすることもありえる。この場合、下記のような計算を行う。まず、100÷42を計算し、商として2.38095・・・を得る。このときに、商を1繰り上げて3箱準備するものとし、3箱に含まれる全包数を42×3=126と求める。次に、準備した3箱に含まれる余分な数を求めるべく、126−100=26を計算し、3箱準備してそこから26包を除けば所望の100包が得られることがわかる。 In addition, when actually making 100 packages, it is possible to calculate by subtracting from one box more than the above-described stacked calculation in consideration of the calculation speed and the inventory quantity. In this case, the following calculation is performed. First, 100 ÷ 42 is calculated, and 2.38095... Is obtained as a quotient. At this time, the quotient is incremented by 1 and 3 boxes are prepared, and the total number of packages contained in the 3 boxes is calculated as 42 × 3 = 126. Next, in order to obtain an extra number contained in the three boxes prepared, 126−100 = 26 is calculated, and it is understood that the desired 100 packets can be obtained by preparing three boxes and removing 26 packets therefrom.
このように、薬局等での計算において、剰余を求め、再利用する計算を頻繁に行い、かつ正確性を求められるにも関わらず、簡便に、かつ正確に処理する手段がないという課題がある。そこで、本発明では、簡便かつ正確に、剰余を扱った計算を処理できる計算機を提供することを目的とする。 As described above, there is a problem in that there is no means for processing simply and accurately in spite of the fact that, in calculations at pharmacies, etc., the remainder is calculated and reused frequently and the accuracy is required. . Therefore, an object of the present invention is to provide a computer capable of processing a calculation that handles a residue simply and accurately.
上記の課題を解決すべく、本発明に係る計算機は、第1入力値A1を正の数である第2入力値B1で除算する第1演算を処理する演算処理部と、第1演算の結果を表示する表示部とを備える計算機であって、演算処理部は、第1演算の結果として、第2入力値B1との積が第1入力値A1を超えない最大の整数である第1整商C1、及び第1入力値A1から第2入力値B1と第1整商C1との積を減じて得られる第1剰余D1を求めるとともに、第1剰余D1が0でない場合に、第1整商C1を1繰り上げた第2整商E1=C1+1と、及び前記第1入力値A1から前記第2入力値B1と第2整商E1との積を減じて得られる第2剰余F1=D1−B1とを求め、表示部は、第1整商C1および第1剰余D1、並びに第2整商E1および第2剰余F1を第1演算の結果として表示する。なお、第2剰余F1は負の数となる。このような構成により、第1入力値を減算式で構成する方法を迅速に求めることができる。 In order to solve the above problems, the computer according to the present invention, an arithmetic processing unit for processing the first operation for dividing the first input value A 1 at the second input value B 1 is a positive number, first arithmetic And a display unit that displays the result of the calculation, the arithmetic processing unit is a maximum integer that the product of the second input value B 1 does not exceed the first input value A 1 as a result of the first calculation. there first integral quotient C 1, and together with the first obtaining a first remainder D 1 obtained by subtracting the product of the input value a 1 and the second input value B 1 and the first integral quotient C 1, the first remainder D When 1 is not 0, the second quotient E 1 = C 1 +1 obtained by raising the first quotient C 1 by 1 and the second input value B 1 and the second quotient from the first input value A 1 obtains a second remainder F 1 = D 1 -B 1 obtained by subtracting the product of the E 1, the display unit includes a first integral quotient C 1 and the first remainder D 1, and the second The quotient E 1 and the second remainder F 1 displays as a result of the first calculation. Note that the second remainder F 1 becomes a negative number. With such a configuration, it is possible to quickly find a method of configuring the first input value with a subtraction formula.
具体的には、例えば、表示部は、第1演算の結果として、第1整商C1および第1剰余D1と、第2整商E1および第2剰余F1とを切り替えて表示するとよい。あるいは、第1演算の結果として、第1整商C1および第1剰余D1と、第2整商E1および第2剰余F1の両方を同時に表示してもよい。また、表示部は、第1演算の結果を、第1整商C1および第1剰余D1を含む数式、または、第2整商E1および第2剰余F1を含む数式として表示するとよく、具体的には、計算機は、第1演算の結果を、A1=B1×C1+D1の形式、またはA1=B1×E1+(F1)の形式で表示するとよい。このような構成により、計算結果の意味を理解し易い態様で表示することができる。 Specifically, for example, when the display unit switches and displays the first quotient C 1 and the first remainder D 1 and the second quotient E 1 and the second remainder F 1 as a result of the first calculation. Good. Alternatively, as a result of the first calculation, both the first quotient C 1 and the first remainder D 1 and the second quotient E 1 and the second remainder F 1 may be displayed simultaneously. Further, the display unit may display the result of the first calculation as an equation including the first quotient C 1 and the first remainder D 1 or as an equation including the second quotient E 1 and the second remainder F 1. Specifically, the computer may display the result of the first calculation in the format of A 1 = B 1 × C 1 + D 1 or in the format of A 1 = B 1 × E 1 + (F 1 ). With such a configuration, the meaning of the calculation result can be displayed in an easily understandable manner.
本発明では、計算機は、第1剰余D1を、第1演算の次に実行する第2演算における第1入力値A2として使用するための剰余利用キーを備えるとよい。このような構成により、剰余を再利用した演算を迅速に行うことができる。 In the present invention, computer, the first remainder D 1, to be provided with a remainder utilization key for use as a first input value A 2 in the second operation to be executed next to the first operation. With such a configuration, it is possible to quickly perform an operation that reuses the remainder.
本発明に係る計算機の他の態様では、計算機は、第1入力値A1を正の数である第2入力値B1で除算する第1演算を処理して、第1演算の結果として、第2入力値B1との積が第1入力値A1を超えない最大の整数である第1整商C1、及び第1入力値A1から第2入力値B1と第1整商C1との積を減じて得られる第1剰余D1を求める演算処理部と、第1演算の結果として、第1整商C1および第1剰余D1を表示する表示部と、第1剰余D1を、第1演算の次に実行する第2演算における第1入力値A2として使用するための剰余利用キーを備える。このような構成により、剰余を再利用した演算を迅速に行うことができる。 In another aspect of the calculator according to the present invention, the calculator processes a first operation that divides the first input value A 1 by a second input value B 1 that is a positive number, and as a result of the first operation, The first integer C 1 , which is the largest integer whose product with the second input value B 1 does not exceed the first input value A 1, and the second input value B 1 and the first integer from the first input value A 1 . An arithmetic processing unit that obtains a first remainder D 1 obtained by subtracting the product of C 1 , a display unit that displays the first quotient C 1 and the first remainder D 1 as a result of the first computation, the remainder D 1, provided with a remainder utilization key for use as a first input value a 2 in the second operation to be executed next to the first operation. With such a configuration, it is possible to quickly perform an operation that reuses the remainder.
本発明では、表示部は、第1演算の結果を、第1整商C1および第1剰余D1を含む数式として表示するとよい。具体的には、計算機は、第1演算の結果を、A1=B1×C1+D1の形式で表示するとよい。このような構成により、計算結果の意味を理解し易い態様で表示することができる。 In the present invention, the display unit may display the result of the first calculation as an equation including the first quotient C 1 and the first remainder D 1 . Specifically, the computer may display the result of the first calculation in the format of A 1 = B 1 × C 1 + D 1 . With such a configuration, the meaning of the calculation result can be displayed in an easily understandable manner.
本発明に係る計算機の他の態様では、計算機は、0以上の数である被除数A1と、n個(nは2以上の整数)の除数(B1,B2,…,Bn(ただし、2からnまでの整数kについて、Bk−1>Bk))の組である除数群BGとを入力するための入力部と、入力された被除数A1および除数群BGについて、被除数A1を、B1×C1+B2×C2+…+Bn×Cn+Dnと表現することのできるn個の整商(C1,C2,…,Cn)の組である整商群CG及び剰余Dnを算出する演算処理部と、演算処理部が算出した整商群CGに属するn個の整商(C1,C2,…,Cn)と剰余Dnを表示する表示部とを備える。 In another aspect of the computer according to the present invention, the computer includes a dividend A 1 that is a number greater than or equal to 0 and n (n is an integer greater than or equal to 2) divisors (B 1 , B 2 ,..., B n (where For an integer k from 2 to n, an input unit for inputting a divisor group B G that is a set of B k−1 > B k )), and an input dividend A 1 and divisor group B G The dividend A 1 is a set of n quotients (C 1 , C 2 ,..., C n ) that can be expressed as B 1 × C 1 + B 2 × C 2 +... + B n × C n + D n. An arithmetic processing unit that calculates a certain quotient group C G and a remainder D n , n number of quotients (C 1 , C 2 ,..., C n ) belonging to the quotient group C G calculated by the arithmetic processing unit and a remainder and a display unit for displaying the D n.
本発明では、演算処理部は、mを1からnまでの整数として、m=1からm=nまで順次、Bmとの積がAmを超えない最大の整数である整商Cm、及びAmからBmとCmとの積を減じて得られる剰余Dmを求めるとともに、DmをAm+1として後続の演算に用い、表示部は、整商群CGとm=nのときの剰余Dnを表示するように構成するとよい。 In the present invention, the processing unit is an integer of from 1 to m to n, sequentially from m = 1 to m = n, the product of B m is the maximum integer not exceeding A m integral quotient C m, and with obtaining the remainder D m obtained from a m by subtracting the product of B m and C m, with the subsequent calculation of D m as a m + 1, the display unit, the integral quotient group C G and m = n it may be configured to display the remainder D n of time.
本発明では、入力部は、除数群BGを一括して入力可能に構成されてもよい。例えば、入力部は、所定の除数群BGを割り当てたプリセットキーを備え、当該プリセットキーへの入力操作により除数群BGを一括して入力可能とするとよい。 In the present invention, the input unit, the divisor group B G may be input configured to be able to collectively. For example, the input unit includes a preset key assigned a predetermined divisor group B G, may allow input collectively divisor group B G by an input operation to the preset key.
本発明では、表示部は、整商群CGを構成するn個の整商と、剰余Dnとを視覚的に区別可能に表示してもよい。例えば、表示部は、整商群CGを構成するn個の整商を所定の区切り記号により区切って表示するとともに、整商群CGと剰余Dnとを所定の区切り記号とは異なる区切り記号により区切って表示してもよい。ここで、「区切り記号」とは、数字、小数点、及び演算子以外の文字(又は文字列)であり、空白(スペース)を含んでもよい。 In the present invention, the display unit includes n integral quotient which constitutes the integral quotient group C G, may be distinguishably displayed visually and the remainder D n. For example, the display unit is different delimiter and displays separated by n pieces of integral quotient a predetermined delimiter constituting the integral quotient group C G, and integral quotient group C G and a remainder D n to a predetermined delimiter They may be displayed separated by symbols. Here, the “separator” is a character (or character string) other than a number, a decimal point, and an operator, and may include a space.
或いは、表示部は、整商群CGを構成するn個の整商と、剰余Dnとを異なる書式の文字で表示するとよい。ここで、文字の「書式」とは、フォント、文字の大きさ、色彩、太さ、斜体、下線の有無等、文字の体裁、装飾を指す。 Alternatively, the display unit includes n integral quotient which constitutes the integral quotient group C G, may be displayed and a remainder D n with the letter different formats. Here, the “format” of a character refers to the appearance and decoration of the character, such as font, character size, color, thickness, italic, presence or absence of underline.
本発明では、計算機は、第1剰余D1が0でない場合に端数を切り上げてC1+1を表示させるための入力キーをさらに備えてもよい。このような構成により、様々な発注単位での発注数量を不足なく迅速に求めることができる。 In the present invention, the computer may further include an input key for rounding up and displaying C 1 +1 when the first remainder D 1 is not 0. With such a configuration, the order quantity in various order units can be quickly obtained without shortage.
上記の課題を解決すべく、本発明のプログラムは、コンピュータを上述の計算機として機能させる。このような構成により、簡便かつ正確に、剰余を扱った計算を処理できる計算機を種々のコンピュータにより実現することができる。 In order to solve the above problems, the program of the present invention causes a computer to function as the above-described computer. With such a configuration, it is possible to realize a computer capable of processing a calculation that handles a residue simply and accurately with various computers.
〔第1実施形態〕
以下、図面を参照して本発明の第1実施形態に係る計算機を薬局で薬の払い出し数量や発注数量を計算するために利用する場合を例に取り説明する。図1は、本発明の第1実施形態に係る計算機100の概略を示す構成図である。また、図2は、本発明の第1実施形態に係る剰余表示付き計算機100の機能ブロック図である。図1に示すように、計算機100は、筐体110に液晶パネルなどの表示部120と、各種の入力キーで構成される入力部130が配置されて構成される。入力部130は、数値入力キー131、四則演算キー132、剰余演算キー133、剰余利用キー134、剰余記憶キー135、解答キー136、表示切替キー137、クリアキー138−1、オールクリアキー138−2、及び発注量キー139を備える。また、計算機100は、筐体110の内部に、CPU等の演算処理部140と、記憶部150を備える。記憶部150は、例えば演算処理部により実行されるプログラムを格納するROMと、入力された数字や計算結果等を記憶するRAMとを備える。
[First Embodiment]
Hereinafter, a case where the computer according to the first embodiment of the present invention is used for calculating a medicine dispensing quantity and an order quantity in a pharmacy will be described as an example with reference to the drawings. FIG. 1 is a configuration diagram showing an outline of a
表示部120は、入力された数字、演算子、計算結果等を表示する。入力部130を構成する各キーは、例えば、それぞれ押しボタン式のスイッチにより構成される。以下、各キーの機能に割り当てられた機能について説明する。
The
数値入力キー131は、数値を入力するためのキーであり、0から9までの数字を備え、さらに小数点を備えてもよい。さらに、頻繁に使う数字(例えば薬局の場合、週単位や三食後といった指定での処方の頻度が多いため14、21、30等を頻繁に用いる)がある場合などには、当該数字を入力するためのキーを備えてもよい。四則演算キー132は、それぞれ、当該キーが押される直前に入力された第1入力値と、当該キーが押された直後に入力される第2入力値との加算、減算、除算、または乗算の計算を指示するキーである。
The numerical
剰余演算キー133は、除算の結果として整商と剰余を求めさせる演算(以下、剰余演算という)を指示するためのキーである。剰余利用キー134は、直前の除算で求めた剰余を、次の計算における第1入力値とするためのキーである。なお、直前の除算での剰余が0の場合には、0を次の計算における第1入力値とする。なお、剰余に代えて(あるいは剰余と選択的に)直前の除算の商を次の計算における第1入力値とすることができるように構成してもよく、このために商利用キーをさらに備えてもよい。剰余記憶キー135は、一時的に剰余を記憶部150に記憶させるためのキーである。記憶された剰余は、剰余記憶キー135を再度押すことで呼び出すようにしてもよく、呼び出し専用キー(不図示)を設け、当該呼び出し専用キーを押したときに呼び出すようにしてもよい。剰余記憶キー135は、除算の直後には剰余を利用しないが、いくつかの他の計算の後に剰余を利用したい場合に有効である。なお、剰余記憶キー135に加え、直前の除算の商を記憶部150に記憶させるための商記憶キーをさらに備えてもよい。
The
解答キー136は、第2入力値(剰余演算以外の演算において第2入力値以降に続けて演算子・数値を入力することを許容する場合には最終入力値)の入力完了を指示するとともにそれまでの入力に基づいた演算を演算処理部140に実行させ、計算結果を表示部120に表示させるためのキーである。表示切替キー137は、解答キー136を押すことで表示部120に表示される計算結果の表現形式を切り替えるためのキーである。この表示切替キー137の操作によって切り替えられる表現形式については、後述する。クリアキー138−1は、直前に入力した値や演算子を記憶部150から消去するためのキーである。オールクリアキー138−2は、直前に入力した値や演算子だけでなく、一連の入力や計算結果に関して記憶部150に記憶されている情報をすべて消去するためのキーである。
The
発注量キー139は、箱単位等で調達される薬の発注量を求めるためのキーである。処方された薬が在庫不足の場合、薬局が卸売業者に薬Xを必要量だけ至急で届けるよう緊急で手配する場合がある。このとき、卸売業者が取り扱う発注単位は、薬の種類によって様々である。正確かつ迅速に発注量を何発注単位とするかを決定するために、計算機100は、発注量キー139が押されると、入力された調達数量と発注単位とに基づいて、最小限の発注量を求める。具体的には、計算機100の演算処理部140は、第1入力値として入力される調達数量を、発注量キー139を押した後に第2入力値として入力される発注単位で除算し、小数第一位を切り上げた数値を計算結果とする。
The
なお、図1に示したキーの配列は、あくまで例示であり、同様の機能を実現できる構成であれば、図1に記載された配列に限定されない。 The key arrangement shown in FIG. 1 is merely an example, and is not limited to the arrangement shown in FIG. 1 as long as a similar function can be realized.
ここで、本実施形態に係る計算機を用いて、1回目の除算の被除数を100、除数を42、2回目の除算(1回目の除算の剰余を除数とする除算)の除数を3とした計算を行う場合の手順の一例を説明する。この計算は、100包の薬剤を処方すべき状況において、当該薬剤が42包入りの箱及び3連包の形態の在庫がある場合に、箱、3連包、及び個別包をそれぞれいくつ用意すればよいかを求める場合の計算に相当する。計算を開始するのに先立ち、オールクリアキー138−2を押して過去の入力内容や計算結果を記憶部150から消去しておく。続いて、数値入力キー131で、1、0、0を押して第1入力値として100を入力し、次に剰余演算キー133を押して剰余演算を指示する。続いて、数値入力キー131で、4、2を押して第2入力値として42を入力し、解答キー136を押すことで計算結果を得る。数値入力キー131を押すことにより入力された第1入力値、第2入力値、および剰余演算キー133を押すことにより入力された演算指示は、記憶部150に記憶されるとともに表示部120に表示される。さらに、解答キー136を押すと、入力に基づいた演算が実行され、除数との積が被除数以下で最大となる整数の商(以下、第1整商という)と、被除数から除数と第1整商との積を減じた剰余(以下、第1剰余という)とが求められる。計算の結果は記憶部150に記憶されるとともに、表示部120に表示される。本例の場合、表示部120には、「2…16」と表示される。なお、計算結果の表示方法は前述のように整商と剰余を同時に表示してもよいし、それぞれ個別に表示しつつ表示切替キー137等の所定のキーを押下することにより整商と剰余の表示を切り替えるようにしてもよい。
Here, using the computer according to the present embodiment, the dividend for the first division is 100, the divisor is 42, and the second division (division with the first division remainder as the divisor) is 3. An example of a procedure for performing the above will be described. This calculation is based on the situation where 100 medicines are to be prescribed, and if the medicine is in stock in the form of a 42-pack box and a triple-pack, how many boxes, triple-packs, and individual packs are prepared. This corresponds to the calculation for determining what should be done. Prior to starting the calculation, the all clear key 138-2 is pressed to delete the past input contents and calculation results from the
次に、剰余利用キー134を押す。すると、次の計算における第1入力値として、1回目の除算における剰余である16が入力され、表示部120に表示される。続いて、剰余演算キー133を押して剰余演算を指示する。続いて、数値入力キー131で、3を押し、解答キー136を押すことで計算結果を得る。計算結果として表示部120には、「5…1」と表示される。
Next, the
本実施形態の計算機100では、計算結果を商と剰余で表現するだけでなく、式によって表現することも可能としてもよい。例えば上述の計算例における1回目の除算の結果は、100=42×2+16と表示するとよく、2回目の除算の結果は16=3×5+1と表示するとよい。計算結果の表現方法を選択可能とすべく、表示切替キー137を押すことにより、商・剰余での表現と数式での表現とを切り替えられるように構成してもよい。
In the
本実施形態の計算機100は、剰余を再利用しながら除算を繰り返す場合、その計算結果を蓄積して、一連の計算結果として表示することを可能としてもよい。上述の例における2回の除算の計算結果の意味としては、100包の薬剤を準備するときに、42包入りの箱を2箱、3連包を5個、個別の包を1包用意すればよいという意味である。この計算結果の表示として、「2…16、5…1」のように、1回目の除算の商と剰余、2回目の除算の商と剰余を順に表示するとよい。また、表示切替キー137により式での表示を選択した場合には、「100=42×2+3×5+1」のように計算結果を表示するとよい。3回目以降の除算が繰り返される場合にも同様、商・剰余による表現、または式による表現により計算結果を表示するとよい。
When the
他の表示例としては、除算をn回繰り返した場合に、最後の1回の除算のみ商と剰余を表示し、1〜n−1回目の演算については商のみを表示するようにしてもよい。この場合、表示部120は、n個の商と剰余とを視覚的に区別可能に表示することが好ましい。例えば、表示部120は、n個の商は所定の区切り記号によって区切って表示し、剰余は、商を区切るのとは異なる区切り記号により区切って表示するとよい。ここで、区切り記号とは、数字、小数点、及び演算子以外の文字(又は文字列)、空白(スペース)等とするとよい。具体的には、「1回目の除算の商、2回目の除算の商、・・・、n回目の除算の商、 n回目の除算の剰余」のように、n個の商と1個の剰余をスペース等で区切って表示するとよい。あるいは「{1回目の除算の商、2回目の除算の商、・・・、n回目の除算の商}n回目の除算の剰余」のように、n個の商を括弧で囲んで表示するとともに、n回目の除算の剰余を括弧の外に表示してもよい。上記の例では中括弧(波括弧)を用いたが、小括弧(丸括弧)、大括弧(角括弧)、鉤括弧等としてもよい。このような表示により、商と最終剰余(n回目の除算の剰余)を区別するとともに、表示桁数を節約することができる。視覚的に区別可能な表示の他の例としては、n個の商と剰余とを異なる書式(例えばフォント、文字の大きさ、色彩、太さ、斜体、下線の有無等)で表示するとよい。或いは、整商群と剰余の一方を点滅させる等の動的な変化により視覚的に区別可能としてもよい。
As another display example, when division is repeated n times, the quotient and remainder may be displayed only for the last one division, and only the quotient may be displayed for the first to (n-1) th operations. . In this case, the
計算機100は、表示部120の表示領域の広さ、記憶部150の記憶容量等の制約条件に鑑み、一連の計算結果として表示する連続計算回数の上限を決めてもよい。オールクリアキー138−2が押された場合、剰余を再利用する除算の繰り返しが途切れた場合、連続計算回数の上限に達した場合等には、一連の計算結果としての表示をしないように構成してもよい。また、表示切替キー137を所定回数押下することにより、一連の計算結果としての表示と他の表現での表示とを選択可能としてもよい。
The
さて、本発明の課題で説明した通り、実際に所定の数を作る場合には、前述のような加算型の計算方法ではなく、減算型の計算方法もあり得る。つまり、除算に余りがある場合に、第1整商に1加えた数(以下、第2整商という)と除算の除数との積から、余分な数を差し引くという考え方である。第2整商を採用した場合の剰余(以下第2剰余という)は、被除数から除数と第2整商との積を差し引いた値に相当し、この値は負の値となることから差し引くべき数を知ることができる。なお、第2剰余を求める演算は第1剰余から除数を減算するという演算に簡単化できる。減算型の計算方法を本例に適用すると次のような計算になる。
100=(42×3)+(16−42)=42×3+(−26)
これは、100包の薬剤を準備するときに、42包入りの箱を3箱用意し、その1つの箱から26包を抜き取ればよいことを意味する。
As described in the problem of the present invention, when a predetermined number is actually made, there is a subtraction type calculation method instead of the addition type calculation method as described above. In other words, when there is a remainder in the division, the excess number is subtracted from the product of the number obtained by adding 1 to the first quotient (hereinafter referred to as the second quotient) and the divisor of the division. The remainder when the second quotient is adopted (hereinafter referred to as the second remainder) corresponds to the value obtained by subtracting the product of the divisor and the second quotient from the dividend, and this value should be subtracted because it is a negative value. You can know the number. Note that the operation for obtaining the second remainder can be simplified to the operation of subtracting the divisor from the first remainder. Applying the subtraction type calculation method to this example results in the following calculation.
100 = (42 × 3) + (16−42) = 42 × 3 + (− 26)
This means that when 100 medicines are prepared, three 42-pack boxes are prepared, and 26 packs are extracted from the one box.
上記の計算例において減算型の計算結果を表示部120に表示する場合、商・剰余による表現では、「3…−26」のように第2剰余を負の数として表示するとよい。また、数式として表示する場合には、「100=42×3−26」または「100=42×3+(−26)」と表示するとよい。
When the subtraction type calculation result is displayed on the
実際の利用場面では、加算型の計算結果が適しているか、減算型の計算結果が適しているかは、状況により異なるため、計算機100は、両方の計算結果を確認できるように構成されてもよい。例えば、加算型の計算結果である(42×2)+16と、減算型の計算結果である(42×3)−26とを、表示切替キー137を押すことで、表示の切り替えができるように構成するとよい。具体的には、上述の商・剰余による表現と数式による表現のそれぞれに、加算型と減算型の計算結果を組み合わせて、4通りの表現を切り替えるようにしてもよい。加算型と減算型の表示を切り替えるキーを、商・剰余による表現と式による表現とを切り替えるキーとは別に設けてもよい。あるいは、この加算型の計算結果(すなわち第1整商と第1剰余)と減算型の計算結果(すなわち第2整商と第2剰余)を、表示部120に同時に表示させるように構成してもよい。
In an actual use situation, whether the addition type calculation result or the subtraction type calculation result is appropriate differs depending on the situation. Therefore, the
なお、減算型の計算結果を求めるためのキーを剰余演算キー133とは別に設けてもよい。また、例えば剰余演算キー133を奇数回押した場合には加算型の計算結果(すなわち第1整商と第1剰余)を求め、偶数回押した場合には減算型の計算結果(すなわち第2整商と第2剰余)を求めるようにする等、キーの押下回数に応じて加算型の計算結果と減算型の計算結果を選択できるように構成してもよい。あるいは、剰余演算キー133を押したときに加算型の計算結果を求めるか減算型の計算結果を求めるかをユーザが設定できるように構成してもよい。本段落にて説明したような形態においても、加算型と減算型の表示の切り替えや商・剰余による表現と式による表現の切り替えについては、前述のように実行可能に構成してよい。
Note that a key for obtaining a subtraction type calculation result may be provided separately from the
なお、剰余利用キー134を用いて直前の除算の剰余を次の計算の第1入力値として利用する場合、利用する剰余は第1剰余のみならず負の値である第2剰余であってもよい。この場合、いずれを利用するか選択可能に構成するとよい。剰余利用キー134により利用する剰余は、通常の四則演算(加減乗除)、剰余演算(上述の減算型の計算を含む)の第1入力値として利用される。減算型の剰余演算において第1入力値として負の値を用いる一例として、−26÷3の剰余演算をする場合には、商が−8、剰余が−2となり、計算結果として、「−8…−2」または「−8あまり−2」等と表示部120に表示するとよい。また計算結果を式として表示する場合には、例えば、「−26=3×(−8)−2」または「−26=3×(−8)+(−2)」と表示するとよい。なお、式として表示する場合に商を囲む括弧は表示上の便宜として省略してもよい。
When the remainder of the previous division is used as the first input value for the next calculation using the
計算機100が、上述したn回繰り返した除算についてn回の除算の商と最後の1回の除算の剰余を一連の計算結果として表示する機能を備える場合、一連の計算に減算型の計算が含まれるときにはこのような表示ができないように構成してもよいし、減算型の計算を最後の(つまりn回目の)演算として、減算型の計算までの一連の計算結果を表示してもよい。また、減算型の計算の後、所定回数(例えば1回)の除算を許容し、減算型の計算が行われてから最大で所定回数までの一連の計算結果をしてもよい。また、減算型の計算が含まれる場合に何ら制限を設けずに、一連の計算結果を表示できるように構成してもよい。なお、計算機100は、表示部120の表示領域の広さ、記憶部150の記憶容量等の制約条件に鑑み、一連の計算結果として表示する連続計算回数の上限を決めてもよい。
When the
〔第2実施形態〕
以下、本発明の第2実施形態に係る計算機を図面に基づいて説明する。本実施形態に係る計算機200の特徴は、除算の剰余を利用してさらに除算を繰り返す際に、除数を除算の都度指定するのではなく、n回の除算を繰り返す場合にn個の除数の組み合わせである除数群を一括して指定する点で第1実施形態と異なる。このような除数群の指定を実現するための構成を備える点以外は第1実施形態と同様であるので、ここでの説明を省略する。
[Second Embodiment]
Hereinafter, a computer according to a second embodiment of the present invention will be described with reference to the drawings. The feature of the
図3は、本発明の第2実施形態に係る剰余表示付き計算機の概略を示す構成図である。また、図4は、本発明の第2実施形態に係る剰余表示付き計算機の機能ブロック図である。図3に示すように、計算機200は、第1実施形態の計算機100が備える各種のキーに加え、除数群指定開始キー201、次除数指定キー202、除数群指定終了キー203、除数群プリセットキー204、及びプリセット登録キー205を備える。本実施形態の計算機200は、これらのキーにより指定される除数群に含まれる除数を用いて、除算の剰余を利用してさらに除算を繰り返し、その結果を表示する。除数群を構成するn個の除数は、大きい順に指定されるものとし、第1除数、第2除数、・・・第n除数とされる。なお、n個の除数を大きい順ではなくランダムに指定することを許容し、除数群の入力終了後に除数を大きい順に並べ替えてから演算に利用するようにしてもよい。
FIG. 3 is a block diagram showing an outline of a computer with a remainder display according to the second embodiment of the present invention. FIG. 4 is a functional block diagram of a computer with a remainder display according to the second embodiment of the present invention. As shown in FIG. 3, the
除数群指定開始キー201は、剰余演算キー133の押下により指示される剰余演算において用いる除数を、除数群として指定することを指示するキーである。除数群指定開始キー201の押下の後、数値入力キー131を用いて最初の除数を入力する。次除数指定キー202は、入力中の除数を確定するとともに次の除数の入力を開始することを指示するキーである。除数群指定終了キー203は、入力中の除数を確定するとともに、当該入力中であった除数が除数群における最後の除数であることを指示するキーである。
The divisor group designation start key 201 is a key for designating designation of a divisor used in a remainder calculation designated by pressing the
除数群プリセットキー204は、あらかじめ登録した除数群を呼び出すためのキーであり、除数群指定開始キー201、次除数指定キー202、及び除数群指定終了キー203の操作を要することなく、頻繁に使う除数群を1回の操作で入力することを可能とする。プリセット登録キー205は、除数群プリセットキー204に割り当てる除数群を登録することを指示するキーであり、例えば当該プリセット登録キー205が押された直前もしくは直後に指定された除数群を除数群プリセットキー204に割り当てる。登録する除数群は、除数群指定開始キー201、次除数指定キー202、除数群指定終了キー203、及び数値入力キー131を用いて入力する。除数群プリセットキー204に割り当てられた除数群は、記憶部150に格納され、プリセット登録の操作により更新される。なお、除数群を複数登録しておけるように構成してもよい。この場合、除数群プリセットキー204を登録できる除数群の数だけ設けたり、除数群プリセットキー204や他のキーの操作シーケンスにより指定したりすること等により、所望の除数群を呼び出せるように構成するとよい。
The divisor group preset key 204 is a key for calling a divisor group registered in advance, and is frequently used without requiring the operations of the divisor group designation start key 201, the next
続いて、計算機200を用いて除数群を指定することにより剰余の除算を繰り返す演算(以下、一括剰余演算という)の結果を得るための操作方法の一例を説明する。ここでは一例として、270包の薬剤を処方すべき状況(例えば1日3包ずつ、90日分の一括処方)において、当該薬剤が189包入りの大包装、42包入りの中包装、21包の小包装、及び個別包が準備可能な場合に270包の準備方法を求める場合の計算を例に説明する。
Next, an example of an operation method for obtaining a result of an operation that repeats division of a remainder (hereinafter referred to as a batch remainder operation) by specifying a divisor group using the
計算を開始するのに先立ち、オールクリアキー138−2を押して過去の入力内容や計算結果を記憶部150から消去しておく。続いて、数値入力キー131で、2、7、0を押して第1入力値(被除数)として270を入力し、次に剰余演算キー133を押して剰余演算を指示する。続いて、除数群指定開始キー201を押して、一括剰余演算における除数群を入力することを指示する。次に、数値入力キー131で、1、8、9を押して除数群における最初の除数として189を入力する。続いて、次除数指定キー202を押すことで最初の除数として189を確定するとともに、第2の除数の入力が可能な状態とする。そして、数値入力キー131で、第2の除数として42を入力する。続いて、次除数指定キー202を押すことで第2の除数として42を確定するとともに、第3の除数の入力が可能な状態とする。そして、数値入力キー131で、第3の除数として21を入力し、除数群指定終了キー203を押して除数群の入力を終了する。除数群に属する除数として、3つの数値189、42、及び21が入力されたことになる。さらに、解答キー136を押すと、被除数である270と第1除数である189との1回目の除算、1回目の除算の剰余である81と第2除数である42との2回目の除算、2回目の除算の剰余である39と第3除数である21との3回目の除算が実行される。
Prior to starting the calculation, the all clear key 138-2 is pressed to delete the past input contents and calculation results from the
そして、演算結果が記憶部150に記憶されるとともに、表示部120に表示される。n個の除数による除数群を指定した場合に、計算結果は、1〜n回目の除算についてのn個の商(以下、整商群という)とn回目の除算の剰余とを表示するとよい。表示部120は、整商群を構成するn個の商と1個の剰余とを視覚的に区別可能に表示することが好ましい。例えば、表示部120は、n個の商は所定の区切り記号によって区切って表示し、整商群と剰余とは、商を区切るのとは異なる区切り記号により区切って表示するとよい。ここで、区切り記号とは、数字、小数点、及び演算子以外の文字(又は文字列)、空白(スペース)等とするとよい。具体例としては、「1回目の除算の商、2回目の除算の商、・・・、n回目の除算の商、 n回目の除算の剰余」のように、n個の商と1個の剰余をスペースで区切って表示するとよい。あるいは「{1回目の除算の商、2回目の除算の商、・・・、n回目の除算の商}n回目の除算の剰余」のように、n個の商を括弧で囲んで表示するとともに、n回目の除算の剰余を括弧の外に表示してもよい。上記の例では中括弧(波括弧)を用いたが、小括弧(丸括弧)、大括弧(角括弧)、鉤括弧等としてもよい。上記の計算例の場合、計算結果は、例えば、「{1,1,1}18」と表示される。視覚的に区別可能な表示の他の例としては、n個の商と剰余とを異なる書式(フォント、文字の大きさ、色彩、太さ、斜体、下線の有無、の文字等)で表示するとよい。或いは、整商群と剰余の一方を点滅させる等の動的な変化により視覚的に区別可能としてもよい。また、計算結果における商だけでなく、除数群の入力時等についてもn個の値を括弧で囲み、区切り記号で区切って表示してもよい。この場合、n個の値が除数群を構成することを示す括弧などの記号と、n個の値が整商群を構成することを示す括弧などの記号とは、共通のものを用いるものとしてもよく、両者を区別するため、異なるものを用いてもよい。
The calculation result is stored in the
計算結果は、数式を用いて表示してもよい。例えば、上記の計算例の場合、計算結果として表示部120に「270=189×1+42×1+21×1+18」と表示するとよい。このような数式による計算結果の表現によれば、除数と商の組み合わせを一目で確認することができる。
The calculation result may be displayed using a mathematical formula. For example, in the case of the above calculation example, “270 = 189 × 1 + 42 × 1 + 21 × 1 + 18” may be displayed on the
除数群プリセットキー204を用いて除数群を指定する場合には、被除数の入力、剰余演算キー133の押下、除数群プリセットキー204の押下、複数の除数群をプリセット出来る場合には所望の除数群の選択・呼出、解答キー136の押下の順に操作すればよく、これにより素早く入力を行うことができる。
When a divisor group is specified using the divisor group preset key 204, the dividend is input, the
なお、以上の説明では除数群を構成する除数を複数入力する場合(すなわちnが2以上の整数)を想定してここまで説明したが、仮に除数群指定開始キー201を押下した後に、除数を1つしか入力せずに除数群指定終了キー203を押下した場合には、エラー表示をするよう構成してもよく、あるいは通常の剰余演算を行って結果を表示するよう構成してもよく、演算結果が小数で出る通常の除算を行って結果を表示するよう構成してもよい。また、除数群指定終了キー203を押さずに解答キー136を押した場合には、エラー表示をするよう構成してもよく、解答キー136を押す直前に入力した数値を除数群における最後の除数とみなして演算を実行するように構成してもよい。あるいは、演算を実行することなく演算内容(すなわち、指定中の除数群)の表示状態を維持するように構成してもよい。
In the above description, the case where a plurality of divisors constituting the divisor group are input (that is, n is an integer of 2 or more) has been described so far. However, after the divisor group designation start key 201 is pressed, the divisor is changed. When the divisor group
また、上記の第2実施形態では、除数群指定開始キー201を押下し、除数の入力と次除数指定キー202の押下を繰り返し、最後の除数を入力した後で除数群指定終了キー203を押すという手順により除数群を指定して一括剰余演算を実行する構成を例に説明したが、除数群の指定方法はこれ以外の方法であってもよい。例えば、一括剰余演算を行う旨を指示するためのキー(例えば「{}」が表示されたキー)を設け、このボタンを押下することにより、以後に入力される複数の数が一括剰余演算における除数群である旨を指示するように構成してもよい。そして、実際に一括剰余演算を行う際には、はじめに当該キーを押し、続けて所望の除数群を指定するべく除数の入力と次除数指定キー202の押下を繰り返し、最後の除数を入力した後で解答キー136を押下するという手順により除数群を指定して一括剰余演算を実行するように構成してもよい。
In the second embodiment, the divisor group designation start key 201 is pressed, the divisor input and the next
〔第3実施形態〕
以下、本発明の第3実施形態に係る計算機を図面に基づいて説明する。本実施形態に係る計算機300の特徴は、第2実施形態と同様のn回の除算を繰り返す場合にn個の除数の組み合わせである除数群を一括して指定する一括剰余演算が可能な計算機において、被除数及び除数について分数を入力可能とした点にある。このような分数を入力するための構成を備える点以外は第2実施形態と同様であるので、ここでの説明を省略する。なお、n回の除算によるn個の商はいずれも0以上の整数となり、これらn個の商が整商群を構成する。
[Third Embodiment]
Hereinafter, a computer according to a third embodiment of the present invention will be described with reference to the drawings. A feature of the
図5は、本発明の第3実施形態に係る剰余表示付き計算機の概略を示す構成図である。また、図6は、本発明の第3実施形態に係る剰余表示付き計算機の機能ブロック図である。図5に示すように、計算機300は、第2実施形態の計算機200が備える各種のキーに加え、分子入力キー301、帯分数入力キー302、分数小数変換キー303、帯分数仮分数変換キー304、及び約分キー305を備える。本実施形態の計算機300は、第2実施形態の計算機200が備えたキーに加えこれらの分数入力用のキーにより指定される除数群に含まれる除数を用いて、除算の剰余を利用してさらに除算を繰り返し、その結果を表示する。除数群を構成するn個の除数は、大きい順に指定されるものとし、第1除数、第2除数、・・・第n除数とされる。なお、n個の除数を大きい順ではなくランダムに指定することを許容し、除数群の入力終了後に除数を大きい順に並べ替えてから演算に利用するようにしてもよい。
FIG. 5 is a configuration diagram showing an outline of a computer with a remainder display according to the third embodiment of the present invention. FIG. 6 is a functional block diagram of a computer with a remainder display according to the third embodiment of the present invention. As shown in FIG. 5, the
分子入力キー301は、その後に分数の分子が入力されることを指示するキーである。すなわち、数値入力キー131により数値(整数)を入力し、その後分子入力キー301を押下し、続けて数値入力キー131により数値(整数)を入力することにより、分子入力キー301を押下する前に入力した数値を分母、分子入力キー301を押下後に入力した数値を分子とする分数を入力することができる。
The
帯分数入力キー302は、帯分数の入力を指示するキーである。すなわち、数値入力キー131により数値(整数)を入力し、その後帯分数入力キー302を押下し、続けて数値入力キー131と分子入力キー301により分数を入力することにより、帯分数入力キー302を押下する前に入力した数値を整数部、帯分数入力キー302を押下後に入力した分数を分数部とする帯分数を入力することができる。
A mixed
分数小数変換キー303は、小数と分数を相互に変換することを指示するキーである。すなわち、表示部120に小数が表示されている状態で分数小数変換キー303を押下すると、表示中の小数を分数に変換して表示する。反対に、表示部120に分数が表示されている状態で分数小数変換キー303を押下すると、表示中の分数を小数に変換して表示する。表示する値が1より大きいまたは−1より小さい場合には、分数での表示は仮分数で表示してもよいし、帯分数で表示してもよい。
The fractional
帯分数仮分数変換キー304は、帯分数と仮分数を相互に変換することを指示するキーである。すなわち、表示部120に帯分数が表示されている状態で帯分数仮分数変換キー304を押下すると、表示中の帯分数を仮分数に変換して表示する。反対に、表示部120に仮分数が表示されている状態で帯分数仮分数変換キー304を押下すると、表示中の仮分数を帯分数に変換して表示する。
The mixed number improper
約分キー305は、表示部120に表示中の分数を約分することを指示するキーである。例えば、約分キー305を押下する毎に、表示中の分数を小さい約数から順番に約分するように構成される。なお、約分可能な分数を表示している最中には、表示部に約分可能であることを示すシンボルを表示するとよい。約分キー305を備えるので、分数入力キーを用いて入力する分数は、既約分数に限定されない。
The reduced
本実施形態の計算機300では、第2実施形態の計算機200が備えるキーに加えて分数入力用のキーを備えることにより、真分数、仮分数、帯分数、小数、及び整数のいずれをも入力することができる。さらに分数や小数の入力を容易にすべく、表示中の数値を逆数に変換するための逆数キーをさらに備えるように構成してもよい。なお、分数の分母及び分子として扱うことのできる桁数に制限を設けてもよい。同様に小数についても取り扱うことのできる桁数に制限を設けてもよい。桁数制限を設ける場合、制限を超える桁の数値については、四捨五入、切り捨て、切り上げ等により制限内の桁数の数値に近似して扱うようにするとよい。また、分数で表わすことのできる循環小数(例えば3分の1、7分の1など)の入力が可能であるように構成してもよい。
In the
続いて、計算機300を用いて除数群を指定することにより一括剰余演算の結果を得るための操作方法の一例を説明する。ここでは一例として、被除数が78/60(60分の78)、除数群を構成する除数が、1/2、1/3、1/4、及び1/5の4つである場合を例に説明する。
Next, an example of an operation method for obtaining a result of the batch remainder calculation by designating a divisor group using the
計算を開始するのに先立ち、オールクリアキー138−2を押して過去の入力内容や計算結果を記憶部150から消去しておく。続いて、数値入力キー131で、6、0を押して第1入力値(被除数)の分母となる60を入力し、続いて分子入力キー301を押下して分子を入力可能とする。そして、数値入力キー131で7、8を押下することにより、被除数として78/60を入力する。
Prior to starting the calculation, the all clear key 138-2 is pressed to delete the past input contents and calculation results from the
次に剰余演算キー133を押して剰余演算を指示する。続いて、除数群指定開始キー201を押して、一括剰余演算における除数群を入力することを指示する。次に、被除数の入力と同様に数値入力キー131と分子入力キー301を用いて、1/2を入力する。続いて、次除数指定キー202を押すことで最初の除数として1/2を確定するとともに、第2の除数の入力が可能な状態とする。そして、数値入力キー131と分子入力キー301を用いて、第2の除数として1/3を入力する。続いて、次除数指定キー202を押すことで第2の除数として1/3を確定するとともに、第3の除数の入力が可能な状態とする。同様の手順を繰り返して、第3の除数として1/4、第4の除数として1/5を入力し、除数群指定終了キー203を押して除数群の入力を終了する。除数群を構成する除数として、1/2、1/3、1/4、及び1/5が入力されたことになる。
Next, the
さらに、解答キー136を押すと、被除数である78/60と第1除数である1/2との1回目の除算、1回目の除算の剰余である18/60と第2除数である1/3との2回目の除算、2回目の除算の剰余である18/60と第3除数である1/4との3回目の除算、3回目の除算の剰余である3/60と第4除数である1/5との4回目の除算が実行される。
Further, when the
そして、演算結果が記憶部150に記憶されるとともに、表示部120に表示される。n個の除数による除数群を指定した場合に、計算結果は、1〜n回目の除算についてのn個の商(以下、整商群という)とn回目の除算の剰余とを表示する。上記の計算例の場合、計算結果は、例えば、「{2,0,1,0}3/60」と表示される。計算結果は、数式を用いて表示してもよい。例えば、上記の計算例の場合、計算結果として表示部120に「78/60=1/2×2+1/3×0+1/4×1+1/5×0+3/60」と表示するとよい。このような数式による計算結果の表現によれば、除数と商の組み合わせを一目で確認することができる。
The calculation result is stored in the
なお分数の剰余について、約分ができる場合、もしくは約分ができてその候補が複数ある場合、約分を行わずに表示するようにしてもよいし、既約分数(最も簡単化された分数)を表示するように構成してもよい。例えば、上記の計算例の場合には、3/60に代えて1/20を剰余として表示するようにしてもよい。 If the fraction remainder can be reduced, or if there are multiple candidates for the reduction, it may be displayed without reduction, or the irreducible fraction (the most simplified fraction) ) May be displayed. For example, in the case of the above calculation example, 1/20 may be displayed as a remainder instead of 3/60.
被除数と除数の一方を分数、他方を小数としてもよい。被除数と除数に小数と分数が混在する場合に、剰余は被除数に合わせて小数または分数としてもよいし、除数に合わせて小数または分数としてもよい。また、被除数や除数の表示に関わらず、小数または分数うちの予め定められた一方にて表示するように構成してもよい。また、表示部120の表示桁数の制限や演算処理部140の処理能力の制限を鑑みてなお可能であれば、除数群に分数と小数が混在することを許容してもよい。例えば、被除数を37/8、除数群を構成する除数を2、1、0.5、及び1/4として、一括剰余演算を実行し、解として整商群を構成する4つの整商2、0、1、及び0と、剰余1/8を得る、といった計算が実行可能となる。
One of the dividend and the divisor may be a fraction and the other may be a decimal. When the dividend and the divisor are mixed with a decimal and a fraction, the remainder may be a decimal or a fraction according to the dividend, or a decimal or a fraction according to the divisor. Moreover, you may comprise so that it may display by predetermined one of a decimal or a fraction irrespective of the display of a dividend or a divisor. Further, if it is still possible in view of the limitation on the number of display digits of the
本実施形態の分数入力用のキーを、第1実施形態の計算機100に設けて、計算機100においても整数、小数に加えて分数(真分数、仮分数、及び帯分数のいずれをも含む)を扱えるようにしてもよい。この場合、被除数、除数、及び剰余が分数となり得るが、商は整数に限定される。
The key for fraction input of this embodiment is provided in the
〔実施形態の変形〕
なお、本発明は、上記実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれる。
[Modification of Embodiment]
It should be noted that the present invention is not limited to the above-described embodiment, and modifications, improvements, etc. within the scope that can achieve the object of the present invention are included in the present invention.
例えば、上記実施形態では物理的なキーとして各種のキーを備える計算機を例に説明したが、タッチパネルディスプレイを備えたスマートフォン、タブレットPC等のコンピュータ端末に記憶されたコンピュータプログラムにより、当該コンピュータ端末を計算機として機能させてもよい。例えば、この場合、数値入力キー、四則演算キー、剰余演算キー、剰余利用キー、表示切替キー等を図1示したキー配置と同様にタッチパネルディスプレイに表示し、各キーの表示位置への接触を検出した場合に当該キーが押されたものとして計算機への入力を受け取るようにするとよい。 For example, in the above-described embodiment, a computer having various keys as physical keys has been described as an example. However, the computer terminal is calculated by a computer program stored in a computer terminal such as a smartphone or a tablet PC having a touch panel display. It may be made to function as. For example, in this case, numerical input keys, four arithmetic keys, remainder calculation keys, remainder use keys, display switching keys, etc. are displayed on the touch panel display in the same manner as the key arrangement shown in FIG. If detected, it is preferable to receive an input to the computer as if the key was pressed.
また、上記の実施形態では、一括剰余演算を構成するn回の除算で順次用いるn個の除数の組み合わせを予め登録しておき、剰余利用キー134を押したときに次の除算の除数が自動的に入力されるようにしてもよい。
In the above embodiment, a combination of n divisors sequentially used in n divisions constituting a batch remainder operation is registered in advance, and when the
また、計算機は、計算結果を表示部への視覚的な出力の他、音声によって出力することも可能とするとよい。この場合、計算機は、例えば計算結果のデータを読み上げた音声データを合成する音声合成部と、スピーカとを用いて計算結果を音声で出力するとよい。 Further, the computer may output the calculation result by sound in addition to the visual output to the display unit. In this case, for example, the computer may output the calculation result by voice using a voice synthesizer that synthesizes voice data obtained by reading out the calculation result data and a speaker.
上記実施形態では、計算機を薬局で利用する例を用いて説明したが、他の業種・業態でも本発明の計算機は有効に利用することができる。包装の単位が大単位、中単位、小単位等に階層的に構成されている商品の払い出しをする業務では、薬局と同様に剰余を利用して発注された数量の商品を迅速かつ正確に準備することが要求される。このような業務において、本発明の計算機は有効に利用することができる。 In the above-described embodiment, an example in which a computer is used in a pharmacy has been described. However, the computer of the present invention can be used effectively in other types of business / business conditions. In the business of paying out products that are hierarchically organized into large units, medium units, small units, etc., as with pharmacies, the surplus is used to quickly and accurately prepare the ordered quantity of products. It is required to do. In such business, the computer of the present invention can be used effectively.
また、上記の各実施形態で説明した剰余を求める機能では、除数や被除数は整数、小数、分数のいずれであってもよく、これに伴い、剰余も整数、小数、分数のいずれであってもよい。ただし、第1実施形態において説明した機能では、除数は正の数とし、商は整数とする。また、第2実施形態及び第3実施形態において説明した除数群を一括して指定して整商群・最終剰余を求める一括剰余演算では、被除数及び剰余は0以上の数とし、除数は正の数とし、商は0以上の整数とする。これらの条件を満たさない入力がなされた場合に、入力後即座にエラー表示等をすることにより入力を受け付けないように構成してもよいし、一端入力を受け付けて、剰余演算等の演算の実行を指示する解答キー136が押下されたときにエラー表示をするように構成してもよい。また、表示の桁数や容量の制約条件から、一括剰余演算の結果である整商及び剰余の表示桁数に制限を設けてもよい。また制限を超える場合、演算結果を、通常の除算を行った場合と同様に小数によって表示してもよいし、整商と剰余とを切り替えつつ表示してもよい。また、上記各実施形態の計算機は、想定外の操作が行われた場合には、エラー表示をしてもよいし、所定のキーが(例えば数値であれば0、剰余群の入力中であれば除数群指定終了キー等)が入力されたものとして処理を実行するように構成してもよい。
Further, in the function for calculating the remainder described in each of the above embodiments, the divisor or dividend may be any integer, decimal, or fraction, and accordingly, the remainder may be any integer, decimal, or fraction. Good. However, in the function described in the first embodiment, the divisor is a positive number and the quotient is an integer. Further, in the batch remainder calculation for collectively specifying the divisor group described in the second embodiment and the third embodiment and obtaining the quotient group / final remainder, the dividend and the remainder are 0 or more, and the divisor is a positive number. It is a number, and the quotient is an integer of 0 or more. If an input that does not satisfy these conditions is made, it may be configured not to accept the input by displaying an error immediately after the input, or to accept an input and execute a calculation such as a remainder operation. An error may be displayed when the
上記各実施形態の計算機において、さらに、既存の関数電卓等が備える指数入力用のキーを設けて、指数で被除数や除数を入力できるようにしてもよい。 In the calculator of each of the above embodiments, an exponent input key provided in an existing scientific calculator or the like may be further provided so that a dividend or a divisor can be input by an exponent.
また、上記の各実施形態では、計算機が電子卓上計算機(いわゆる電卓)の形態として実現された例を挙げて説明したが、本発明における計算機は、その機能が実現できればいわゆる電卓以外のいかなる形態であっても構わない。例えば、商店等に置かれるキャッシュレジスター(いわゆるレジ)に、本発明の計算機の機能を付加したもの、デスクトップPC、ノートPC、タブレットPC等のコンピュータ(各種コンピュータにテンキー、ディスプレイ等の入出力装置を接続したものを含む)を当該コンピュータ上で実行されるプログラムを用いて本発明の計算機として機能するよう構成したもの等、演算処理機能を有する各種の装置に適用したものについても本発明における計算機に該当することは言うまでもない。また、コンピュータを本発明の計算機として機能させるためのプログラムは、各種記録媒体に格納されて提供される態様のもの、通信回線を介して提供される態様のもの等、いかなる態様によるものも本発明の範囲に含まれる。 Further, in each of the above-described embodiments, an example has been described in which the calculator is realized as a form of an electronic desk calculator (so-called calculator). It does not matter. For example, a cash register (so-called cash register) placed in a store or the like with the function of the computer of the present invention, a computer such as a desktop PC, notebook PC, tablet PC, etc. The computer applied to various apparatuses having an arithmetic processing function, such as a computer configured to function as a computer of the present invention using a program executed on the computer (including those connected) is also included in the computer of the present invention. Needless to say, this is true. Further, the program for causing a computer to function as the computer of the present invention may be in any form such as a form provided by being stored in various recording media or a form provided via a communication line. Included in the range.
また、上記の第1実施形態から第3実施形態のそれぞれに記載した計算機の機能の一部又は全部を組み合わせたものも、その組み合わせにより矛盾が生じない限りにおいて、本発明に含まれる。例えば、第1実施形態の機能により求めた剰余を、剰余利用キーにより次の演算の入力値として利用する場合に、当該次の演算を第2実施形態の除数群を用いた演算とすることも許容される。 A combination of some or all of the functions of the computers described in each of the first to third embodiments is also included in the present invention as long as no contradiction arises due to the combination. For example, when the remainder obtained by the function of the first embodiment is used as an input value of the next calculation by the remainder use key, the next calculation may be calculated using the divisor group of the second embodiment. Permissible.
以上で説明したように、本発明の剰余表示付き計算機は、剰余を扱う計算を、簡便に、かつ正確に行うために利用できる。 As described above, the computer with a remainder display according to the present invention can be used to easily and accurately perform a calculation for handling a remainder.
100・・・計算機
110・・・筐体
120・・・表示部
130・・・入力部
140・・・演算処理部
150・・・記憶部
DESCRIPTION OF
Claims (18)
前記第1演算の結果を表示する表示部と
を備える計算機であって、
前記演算処理部は、前記第1演算の結果として、前記第2入力値B1との積が前記第1入力値A1を超えない最大の整数である第1整商C1、及び前記第1入力値A1から前記第2入力値B1と第1整商C1との積を減じて得られる第1剰余D1を求めるとともに、
前記第1剰余D1が0でない場合に、前記第1整商C1を1繰り上げた第2整商E1=C1+1、及び前記第1入力値A1から前記第2入力値B1と第2整商E1との積を減じて得られる第2剰余F1=D1−B1とを求め、
前記表示部は、前記第1整商C1および前記第1剰余D1、並びに前記第2整商E1および前記第2剰余F1を前記第1演算の結果として表示することを特徴とする計算機。 An arithmetic processing unit for processing a first operation for dividing the first input value A 1 by the second input value B 1 which is a positive number;
A computer comprising a display unit for displaying a result of the first calculation,
The arithmetic processing unit as a result of the first calculation, the maximum of the first integral quotient C 1 is an integer whose product does not exceed the first input value A 1 and the second input value B 1, and the first with obtaining first input value from said a 1 second input value B 1 and the first remainder D 1 obtained by subtracting the product of the first integral quotient C 1,
If the first remainder D 1 is not zero, the first second integral quotient of integral quotient C 1 was incremented 1 E 1 = C 1 +1, and the second input value from the first input value A 1 B 1 And the second remainder F 1 = D 1 −B 1 obtained by subtracting the product of the second quotient E 1 and
The display unit displays the first quotient C 1 and the first remainder D 1 , and the second quotient E 1 and the second remainder F 1 as a result of the first calculation. calculator.
前記第1演算の結果として、前記第1整商C1および前記第1剰余D1を表示する表示部と、
前記第1剰余D1を、前記第1演算の次に実行する第2演算における第1入力値A2として使用するための剰余利用キーを備えることを特徴とする計算機。 First processing the operation for dividing the first input value A 1 at the second input value B 1 is a positive number, as a result of the first calculation, the product of the second input value B 1 is the first 1 inputs first integral quotient C 1 is the largest integer not exceeding a 1, and obtained by subtracting the product of the second input value B 1 and the first integral quotient C 1 from the first input value a 1 an arithmetic processing unit for obtaining a first remainder D 1 to be,
A display unit for displaying the first quotient C 1 and the first remainder D 1 as a result of the first calculation;
Said first remainder D 1, computer, characterized by comprising the remainder use key for use as a first input value A 2 in the second operation to be executed next to the first operation.
入力された前記被除数A1および前記除数群BGについて、被除数A1を、B1×C1+B2×C2+…+Bn×Cn+Dnと表現することのできるn個の整商(C1,C2,…,Cn)の組である整商群CG及び剰余Dnを算出する演算処理部と、
前記演算処理部が算出した整商群CGに属するn個の整商(C1,C2,…,Cn)と剰余Dnを表示する表示部と
を備える計算機。 A dividend A 1 that is a number greater than or equal to 0 and n (n is an integer greater than or equal to 2) positive divisors (B 1 , B 2 ,..., B n (where B k is an integer k from 2 to n) An input unit for inputting a divisor group B G that is a set of −1 > B k ));
For the inputted dividend A 1 and the divisor group B G, the dividend A 1, B 1 × C 1 + B 2 × C 2 + ... + B n × n pieces of integral quotient that can be expressed as C n + D n An arithmetic processing unit for calculating an quotient group C G and a remainder D n which are a set of (C 1 , C 2 ,..., C n );
The arithmetic processing unit of n belonging to integral quotient group C G calculated integral quotient (C 1, C 2, ... , C n) computer and a display unit for displaying the remainder D n.
前記表示部は、整商群CGとm=nのときの剰余Dnを表示することを特徴とする請求項10に記載の計算機。 The arithmetic processing unit, an integer of from 1 to m to n, sequentially from m = 1 to m = n, the product of B m is the maximum integer not exceeding A m integral quotient C m, and A m To obtain a remainder D m obtained by subtracting the product of B m and C m from D m , and use D m as A m + 1 for subsequent calculations.
Wherein the display unit, computer according to claim 10, characterized in that displaying the remainder D n when the integral quotient group C G and m = n.
A program for causing a computer to function as the computer according to any one of claims 1 to 17.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014102952A JP5895021B2 (en) | 2014-05-19 | 2014-05-19 | Calculator and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014102952A JP5895021B2 (en) | 2014-05-19 | 2014-05-19 | Calculator and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015219730A JP2015219730A (en) | 2015-12-07 |
JP5895021B2 true JP5895021B2 (en) | 2016-03-30 |
Family
ID=54779044
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014102952A Expired - Fee Related JP5895021B2 (en) | 2014-05-19 | 2014-05-19 | Calculator and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5895021B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6819097B2 (en) * | 2016-06-30 | 2021-01-27 | カシオ計算機株式会社 | Computational equipment, computational methods, and programs |
JP6819856B2 (en) * | 2016-09-15 | 2021-01-27 | カシオ計算機株式会社 | Computers, arithmetic processing methods and programs |
JP6846004B2 (en) * | 2016-09-23 | 2021-03-24 | カシオ計算機株式会社 | Computers, arithmetic processing methods and programs |
JP6885057B2 (en) * | 2016-12-26 | 2021-06-09 | カシオ計算機株式会社 | Arithmetic logic unit, display method of arithmetic unit and program for the arithmetic unit |
JP6911361B2 (en) * | 2017-01-19 | 2021-07-28 | カシオ計算機株式会社 | Calculator, calculation method and program |
JP2020024627A (en) * | 2018-08-08 | 2020-02-13 | カシオ計算機株式会社 | Electronic appliance, operand input method to electronic appliance and program |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5459857A (en) * | 1977-10-20 | 1979-05-14 | Sharp Corp | Eletronic calculation training machine |
JP3252493B2 (en) * | 1992-11-30 | 2002-02-04 | カシオ計算機株式会社 | Electronic calculator and its calculation processing method |
US5404324A (en) * | 1993-11-01 | 1995-04-04 | Hewlett-Packard Company | Methods and apparatus for performing division and square root computations in a computer |
JP3071593U (en) * | 1999-01-04 | 2000-09-14 | 近藤 猛 | Calculator with less display |
JP2003167859A (en) * | 2001-11-30 | 2003-06-13 | Toshiba Corp | Mobile communication terminal and control module thereof |
-
2014
- 2014-05-19 JP JP2014102952A patent/JP5895021B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015219730A (en) | 2015-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5895021B2 (en) | Calculator and program | |
CN102184156B (en) | Device for calculating fraction and method for displaying fraction | |
JPS6347874A (en) | Arithmetic unit | |
JP6269220B2 (en) | Formula display control apparatus, formula display control method, formula display control program | |
JP2017174225A (en) | Tax calculator, tax calculation method and program | |
EP2363811A2 (en) | Electronic calculator and display method for displaying mathematical expression in full color | |
CN107832037B (en) | Electronic computer, arithmetic processing method, and recording medium | |
JP2021192316A (en) | Calculation device, calculation method, and program | |
JP6915669B2 (en) | Tax calculator, tax calculation method, and tax calculation program | |
JP6846004B2 (en) | Computers, arithmetic processing methods and programs | |
JP6816392B2 (en) | Computational equipment, computational methods, and programs | |
JP2018005534A (en) | Calculation device, calculation method, and program | |
JP2020024627A (en) | Electronic appliance, operand input method to electronic appliance and program | |
WO1999067704A1 (en) | System for division using small-capacity memory | |
JP3236927U (en) | Reciprocal multiplication key and electronic desk calculator | |
JP2019191729A (en) | Numerical value display method and numerical value display device | |
JP3238576U (en) | Numeric display | |
JP2018077917A (en) | Tax calculator, tax calculation method and program | |
JP6950344B2 (en) | Arithmetic logic units, calculation methods, and programs | |
JP2019095870A (en) | Electronic computer | |
JP6985128B2 (en) | Prescription audit information display device, prescription audit information display method, and prescription audit information display program | |
JP6521047B2 (en) | Formula display control device, formula display control method, formula display control program | |
US3787672A (en) | Electronic calculating device having arithmetic and error-checking operational modes | |
CN100444105C (en) | Method and system for adding display basic number scale symbol to operation equation | |
JP2022052590A (en) | Electronic device, display control method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150915 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151009 |
|
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: 20160209 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160229 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5895021 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R157 | Certificate of patent or utility model (correction) |
Free format text: JAPANESE INTERMEDIATE CODE: R157 |
|
LAPS | Cancellation because of no payment of annual fees |