Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Calculator input methods

From Wikipedia, the free encyclopedia
Ways in which keystrokes are interpreted

There are various ways in whichcalculators interpret keystrokes. These can be categorized into two main types:

  • On asingle-step orimmediate-execution calculator, the user presses a key for each operation, calculating all the intermediate results, before the final value is shown.[1][2][3]
  • On anexpression orformula calculator, one types in an expression and then presses a key, such as "=" or "Enter", to evaluate the expression.[4][5][6] There are various systems for typing in an expression, as described below.

Immediate execution

[edit]
TheTI-108 is a simple four-function calculator which uses single-step execution.

Theimmediate execution mode of operation (also known assingle-step,algebraic entry system (AES)[7] orchain calculation mode) is commonly employed on most general-purpose calculators. In most simple four-function calculators, such as theWindows calculator in Standard mode and those included with most earlyoperating systems, eachbinary operation is executed as soon as the next operator is pressed, and therefore theorder of operations in a mathematical expression is not taken into account.Scientific calculators, including the Scientific mode in the Windows calculator and most modern software calculators, have buttons for brackets andcan take order of operation into account. Also, forunary operations, like √ orx2, the number is entered first, then the operator; this is largely because the display screens on these kinds of calculators are generally composed entirely ofseven-segment characters and thus capable of displaying only numbers, not the functions associated with them. This mode of operation also makes it impossible to change the expression being input without clearing the display entirely.

Examples
FormulaKeystrokes
524+372{\displaystyle 524+372}524+372=
1+2×3{\displaystyle 1+2\times 3}2×3+1=

1+2×3=

sin30+2×cos30{\displaystyle \sin 30+2\times \cos 30}30COSx2+30SIN=

30SIN+2x30COS=

The1+2×3{\displaystyle 1+2\times 3} examples have been given twice. The first version is for simple calculators, showing how it is necessary to rearrange operands in order to get the correct result. The second version is forscientific calculators, whereoperator precedence is observed. Different forms of operator precedence schemes exist. In thealgebraic entry system with hierarchy (AESH),[7] the precedence of basic mathematical operators is taken into account,[7] whereas calculators withalgebraic entry system with parentheses (AESP)[7] support the entry of parentheses.[7] An input scheme known asalgebraic operating system (AOS)[7] combines both.[7] This is the name Texas Instruments uses for the input scheme used in some of its calculators.[8]

Immediate-execution calculators are based on a mixture of infix and postfix notation: binary operations are done as infix, but unary operations are postfix. Because operators are applied one-at-a-time, the user must work out which operator key to use at each stage, and this can lead to problems.[9][10] When discussing these problems,Harold W. Thimbleby has pointed out that button-operated calculators "require numbers and operation signs to be punched in a certain order, and mistakes are easy to make and hard to spot".[11]

Problems can occur because, for anything but the simplest calculation, in order to work out the value of a written formula, the user of a button-operated calculator is required to:

  • Rearrange the formula so that the value can be calculated by pressing buttons one at a time, while taking operator precedence and parentheses into account.
  • Use memory buttons to ensure that operations are applied in the correct order.
  • Use the special buttons± and1/x, that do not correspond to operations in the formula, for non-commutative operators.

Mistakes can be hard to spot because:

  • For the above reasons, the sequence of button presses may bear little resemblance to the original formula.
  • The operation carried out when a button is pressed is not always the same as the button, but could be a previously entered operation.

Examples of difficulties

[edit]

The simplest example given by Thimbleby of a possible problem when using an immediate-execution calculator is 4 × (−5). As a written formula the value of this is −20 because the minus sign is intended to indicate a negative number, rather than a subtraction, and this is the way that it would be interpreted by a formula calculator.

On an immediate-execution calculator, depending on which keys are used and the order in which they are pressed, the result for this calculation may be different. Also there are differences between calculators in the way a given sequence of button presses is interpreted. The result can be:

  • −1: If the subtraction button is pressed after the multiplication×, it is interpreted as a correction of the× rather than a minus sign, so that 4 − 5 is calculated.
  • 20: If the change-sign button± is pressed before the 5, it isn't interpreted as −5, and 4 × 5 is calculated.
  • −20: To get the right answer,± must be pressed last, even though the minus sign isn't written last in the formula.

The effects of operator precedence, parentheses and non-commutative operators, on the sequence of button presses, are illustrated by:

  • 4 − 5 × 6: The multiplication must be done first, and the formula has to be rearranged and calculated as −5 × 6 + 4. So ± and addition have to be used rather than subtraction. When+ is pressed, the multiplication is performed.
  • 4 × (5 + 6): The addition must be done first, so the calculation carried out is (5 + 6) × 4. When× is pressed, the addition is performed.
  • 4 / (5 + 6): One way to do this is to calculate (5 + 6) / 4 first and then use the1/x button, so the calculation carried out is 1/[(5 + 6)/4].
  • 4 × 5 + 6 × 7: The two multiplications must be done before the addition, and one of the results must be put into memory.

These are only simple examples, but immediate-execution calculators can present even greater problems in more complex cases. In fact, Thimbleby claims that users may have been conditioned to avoid them for all but the simplest calculations.

Declarative and imperative tools

[edit]

The potential problems with immediate-execution calculators stem from the fact that they areimperative. This means that the user must provide details ofhow the calculation has to be performed.

Thimbleby has identified the need for a calculator that is more automatic and therefore easier to use, and he states that such a calculator should be moredeclarative. This means that the user should be able to specify onlywhat has to be done, not how, and in which order, it has to be done.

Formula calculators are more declarative since the input formula defines the operation, eliminating the need for users to specify the step-by-step calculation process.

Declarative solutions are easier to understand than imperative solutions,[12] and there has been a long-term trend from imperative to declarative methods.[13][14] Formula calculators are part of this trend.

Many software tools for the general user, such as spreadsheets, are declarative. Formula calculators are examples of such tools.

Using the full power of the computer

[edit]

Software calculators that simulate hand-held, immediate execution calculators do not use the full power of the computer: "A computer is a far more powerful device than a hand-held calculator, and thus it is illogical and limiting to duplicate hand-held calculators on a computer." (Haxial Software Pty Ltd) Formula calculators use more of the computer's power because, besides calculating the value of a formula, they work out the order in which things should be done.

Infix notation

[edit]
"Aesh" redirects here. For the letter which "Æsh" redirects to, seeÆ.
A Sharp scientific calculator using infix notation. Note the formula on the dot-matrix line above and the answer on the seven-segment line below, as well as the arrow keys allowing the entry to be reviewed and edited.
This calculator program has accepted input in infix notation, and returned the answer3,86¯{\displaystyle 3{\text{,}}8{\overline {6}}}. Here the comma is a decimal separator.

Infix notation is a method similar to immediate execution with AESH and/or AESP, but unary operations are input into the calculator in the same order as they are written on paper.

Calculators that use infix notation tend to incorporate adot-matrix display to display the expression being entered, frequently accompanied by a seven-segment display for the result of the expression. Because the expression is not evaluated until it is fully entered, there is provision for editing the entered expression at any point prior to evaluation, as well as replaying entered expressions and their answers from memory.

Mostgraphing calculators byCasio andTexas Instruments use this method. On itsscientific calculators,Sharp calls this methodDirect Algebraic Logic (D.A.L.),[15]Casio calls this method theVisually Perfect Algebraic Method (V.P.A.M.),[16] and Texas Instruments calls it theEquation Operating System (EOS).[8]

Examples
Formulakeystrokeskeystroke count
1+2×3{\displaystyle 1+2\times 3}1+2×3=6
sin30+2×cos30{\displaystyle \sin 30+2\times \cos 30}SIN30+2×COS30=10
(1+2)×(3+4){\displaystyle (1+2)\times (3+4)}(1+2)×(3+4)=12
15+10+10+10{\displaystyle 15+10+10+10}15+10+10+10=12

Reverse Polish notation

[edit]
Screenshot of an RPN Calculator program onLinux
TheHewlett-Packard Voyager series of calculators all use RPN input. The "Enter" key is used here to push the value on the display onto the stack.
Main articles:Reverse Polish notation andReverse Polish Lisp

Inreverse Polish notation,[7] also known aspostfix notation, all operations are entered after theoperands on which the operation is performed. Reverse Polish notation is parenthesis-free, which usually leads to fewer button presses needed to perform an operation. By the use of astack, one can enter formulas without the need to rearrange operands.

Hewlett-Packard'scalculators are well-known examples among calculators which use RPN. Early models, such as theHP-35, used RPN entirely without any alternative methods. Later models can switch between RPN and another notation, such as theHP-12C Platinum which includes both RPN and immediate execution (with operations performed strictly in the order in which inputs are entered), theHP 33s with both RPN and a hybrid of immediate/infix algebraic notation (operations are performed in accordance with standard order of operations, but single-operand functions are input with the operand first followed by the operator), and its successor theHP 35s with both RPN and standard algebraic infix notation.

Examples
Formulakeystrokeskeystroke count
1+2×3{\displaystyle 1+2\times 3}1↵ Enter2↵ Enter3×+

2↵ Enter3×1+

7
6
sin30+2×cos30{\displaystyle \sin 30+2\times \cos 30}30SIN30COS2x+9
(1+2)×(3+4){\displaystyle (1+2)\times (3+4)}1↵ Enter2+3↵ Enter4+×9
15+10+10+10{\displaystyle 15+10+10+10}15↵ Enter10+10+10+

15↵ Enter10↵ Enter↵ Enter↵ Enter+++

15ENTER^10ENTER^ENTER^+++

12
11 (RPL andEntry RPN)[17]
10 (Classical RPN)[17]

Note: The first example illustrates one of the few cases where reverse Polish notation does not use the fewest button presses – provided one does not rearrange operands. If one would do so then only six keystrokes would be needed.

BASIC notation

[edit]
Main article:BASIC
The equation entry screen on aTI-89, showing the brackets after the ln, sin and cos parameters. If these were left out, the equation would be interpreted asln(|t|+sin(t+cos(t))){\displaystyle \ln(\left\vert t\right\vert +\sin(t+\cos(t)))} instead ofln(|t|)+sin(t)+cos(t){\displaystyle \ln(\left\vert t\right\vert )+\sin(t)+\cos(t)}.

BASIC notation is a particular implementation of infix notation where functions require theirparameters to be in brackets.

This method was used from the 1980s to the 1990s in BASIC programmable calculators andpocket computers. Texas Instruments would later implement the method in many of its graphing calculators, including theTI-83 andTI-84 Plus series. Mostcomputer algebra systems (CASes) also use this as the default input method.

In BASIC notation, the formula is entered as it would be entered inBASIC, using thePRINT command – thePRINT command itself being optional. On pressing "ENTER" or "=", the result would be displayed. As with standard infix notation, typing mistakes in the entered formula could be corrected using the same editor function as the one used when programming the calculator.

Examples
Formulakeystrokeskeystroke count
1+2×3{\displaystyle 1+2\times 3}1+2×3↵ Enter6
sin30×cos30{\displaystyle \sin 30\times \cos 30}SIN(30)×COS(30)↵ Enter

SIN(30)×COS(30)↵ Enter

12

16

For the second example, two options are given depending on if the BASIC programmable pocket computers have dedicated trigonometric keys[18] or not.[19]

Ten key notation

[edit]
This printing calculator made by Sharp uses ten-key notation. Notice the size and placement of the keys, including the extra-large "+/=" and the red "-/=" keys.
Further information:Keypad

Theten-key notation input method first became popular with accountants'paper tape adding machines. It generally makes the assumption that entered numbers are being summed, although other operations are supported. Each number entered is followed by its sign (+/−), and a running total is kept. An assumption is made that the last operand can be implicitly used next, so by just entering another + (for example), one will reuse the most recent operand. Ten key input mode is available in printing calculators from companies such asSharp,[20] and in software calculators like Judy's TenKey[21] used by accounting firms. Online tenkey training and certification tools are available as well,[22][23] and some businesses useten key typing speed as an employment criterion.

Examples
Formulakeystrokeskeystroke count
1+2×3{\displaystyle 1+2\times 3}1+2×3=+T8
sin30×cos30{\displaystyle \sin 30\times \cos 30}30SIN×30COS=8
53{\displaystyle 5-3}5+3-T5
15+10+10+10{\displaystyle 15+10+10+10}15+10+++T9

Mathematical display

[edit]
A CasioNatural Display scientific calculator displaying mixed fractions and their decimal equivalents in pretty-printing
See also:Prettyprint
Pretty-printed commands used to plotDini's surface in Mathematica

Modern computer algebra systems, as well as many scientific and graphing calculators, allow for "pretty-printing", that is, entry of equations such thatfractions,surds andintegrals, etc. are displayed in the way they would normally be written. Such calculators are generally similar in appearance to those using infix notation, but feature a full dot-matrix display and templates for entering expressions, which are navigated using arrow keys on the calculator. The templates contain spaces for values or expressions to be entered, and empty values would typically result in a syntax error, making it more cumbersome to navigate than standard infix notation; standard infix notation is often an option on such calculators as well.

Casio used to call this featureNatural Display orNatural textbook display,[24][25] but now usesNatural-VPAM.[26] Sharp calls thisWriteView[27] on its scientific calculators and simplyEquation Editor on its graphing calculators.[28] HP calls this itsTextbook display setting,[29] which can be used in both RPN and Algebraic mode and in both theStack and in theEquation Writer application.[30]Mathematica calls thisSemantic-Faithful Typesetting.[31]Mathcad calls thisstandard math notation.[32]Maple has aMath Equation Editor,[33] but does not have a special name for this input method. Texas Instruments calls itMathPrint,[34] incorporating it in its high-end calculators, such as theTI-Nspire series, and in 2011 added the feature to its TI-84 series with the 2.55 OS update.[35]

Examples
FormulaKeystrokesKeystroke Count
1+2×3{\displaystyle 1+2\times 3}1+2×3↵ Enter6
sin30×cos30{\displaystyle \sin 30\times \cos 30}SIN30×COS30↵ Enter

SIN(30)×COS(30)↵ Enter

9

12

53{\displaystyle 5-3}53↵ Enter4
15+10+10+10{\displaystyle 15+10+10+10}15+10+10+10↵ Enter12

For the second example, two options are given, depending on whether the calculators will automatically insert needed parentheses or not. Machines equipped with an alphanumeric display will displaySIN(30)×COS(30) before↵ Enter is pressed.

See also

[edit]

References

[edit]
  1. ^Microsoft's Windows Operating System Calculator Accessory; 2001. Available on a Windows PC at: Start/All Programs/Accessories/Calculator.
  2. ^MotionNETCalculator page on the InternetArchived 2009-05-01 at theWayback Machine; 2006.
  3. ^Flow Simulation LtdVirtual Calc98 page on the Internet; 2008.
  4. ^Formula Calculators Pty Ltd [Home page on the Internet]; 2009.
  5. ^Moisey OysgeltJavaScript Formula Calculator page on the Internet; 2000.
  6. ^Haxial Software Pty LtdCalculator Product page on the InternetArchived 2009-04-28 at theWayback Machine; 2001
  7. ^abcdefghBall, John A. (1978).Algorithms for RPN calculators (1 ed.). Cambridge, Massachusetts, USA:Wiley-Interscience,John Wiley & Sons, Inc.ISBN 0-471-03070-8.LCCN 77-14977. Retrieved2023-09-21.
  8. ^ab"Differences Between Algebraic Operating System (AOS) and Equation Operating System (EOS)".Texas Instruments. Retrieved2022-11-29.
  9. ^Thimbleby, Harold W. (September 1998)."A new calculator and why it is necessary"(PDF). London, UK: Computing Science, Middlesex University. Archived fromthe original(PDF) on 2007-02-07. Retrieved2009-05-04.
  10. ^Holmes, Neville (2003)."Truth and Clarity in Arithmetic"(PDF). University of Tasmania.Archived(PDF) from the original on 2006-10-07. Retrieved2023-09-21.
  11. ^"Professor devises easier calculator".www.physorg.com.United Press International. 2005-06-27.Archived from the original on 2023-01-15. Retrieved2023-09-20.
  12. ^Furman, Roy E. (July 2006)."Declarative Programming – Strategies for Solving Software Problems". Archived fromthe original on 2012-07-23. Retrieved2009-05-04.
  13. ^Watt, David A. (1990).Programming language concepts and paradigms.Prentice Hall International Series in Computer Science.Prentice Hall.ISBN 978-0-13728874-8.
  14. ^Matsushita, Tatsuru (October 1998)."Expressive Power of Declarative Programming Languages" (PhD thesis). Department of Computer Science, University of York.Archived from the original on 2023-09-21. Retrieved2023-09-21.
  15. ^"SHARP".global.sharp.,
  16. ^"General - Standard Scientific calculators - Calculators - CASIO".support.casio.com.
  17. ^abNelson, Richard J. (April 2012)."HP RPN Evolves"(PDF).HP Solve (27).Hewlett-Packard Development Company, L.P.:42–45.Archived(PDF) from the original on 2022-10-20. Retrieved2022-10-20.[1] (4 of 56 pages)
  18. ^The picture of theCasio FX-880P shows sin, cos and tan keys on the second row right hand side.
  19. ^The picture of theSharp PC-1245 shows no trigonometric keys
  20. ^"SIICA.sharpusa.com > Resources > More Products > Calculators".siica.sharpusa.net.
  21. ^"Award-Winning Judy's TenKey Accounting Calculator for Windows".www.judysapps.com.
  22. ^"Ten Key Certificate on Learn2Type.com!".Learn2Type.com.
  23. ^"None". Retrieved2023-06-16.
  24. ^Natural textbook display - Scientific calculator.
  25. ^"CASIO WEW Worldwide Education Website".CASIO WEW Worldwide Education Website.
  26. ^Natural Visually Perfect Algebraic Mode (V.P.A.M) - Scientific calculatorArchived 2009-04-27 at theWayback Machine.
  27. ^WriteView.
  28. ^Sharp Graphing equation editor.
  29. ^"HP Support document - HP Support Center".h20564.www2.hp.com. Archived fromthe original on 2016-08-26. Retrieved2016-08-23.
  30. ^http://h20331.www2.hp.com/Hpsub/downloads/50gUsing_the_EquationWriter_Part2.pdf.Archived 2011-12-18 at theWayback Machine
  31. ^Semantic-Faithful Typesetting.
  32. ^MathcadArchived 2008-09-20 at theWayback Machine.
  33. ^"Math Equation Editor - Maple Features - Maplesoft".www.maplesoft.com.
  34. ^"TI Products | Graphing Calculators | Scientific Calculators".education.ti.com.
  35. ^"Texas Instruments releases new OS for TI-84, 2.55 MP".Tech Powered Math. 2011-01-14. Retrieved2018-05-12.

Further reading

[edit]
Calculator
Manual
Logarithm
Slide rule
(scale)
Circular
Cylindrical, helical scales
Cylindrical, bars
Mechanical
Pinwheel and
Leibniz wheel
Electronic
Desktop
Pocket
Software
Historical
Retrieved from "https://en.wikipedia.org/w/index.php?title=Calculator_input_methods&oldid=1281107885"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp