Calculator input methods

Short description: Ways in which keystrokes are interpreted

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

* On a single-step or immediate-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 an expression or formula 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.

## Contents

* 1 Immediate execution
* 1.1 Examples of difficulties
* 1.2 Declarative and imperative tools
* 1.3 Using the full power of the computer
* 2 Infix notation
* 3 Reverse Polish notation
* 4 BASIC notation
* 5 Ten key notation
* 6 Mathematical display
* 7 See also
* 8 References
* 9 Further reading

## Immediate execution

The TI-108 is a simple four-function calculator which uses single-step execution.

The immediate execution mode of operation (also known as single-step, algebraic entry system (AES)[7] or chain calculation mode) is commonly employed on most general-purpose calculators. In most simple four-function calculators, such as the Windows calculator in Standard mode and those included with most early operating systems, each binary operation is executed as soon as the next operator is pressed, and therefore the order 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 and can take order of operation into account. Also, for unary operations, like √ or x2, the number is entered first, then the operator; this is largely because the display screens on these kinds of calculators are generally composed entirely of seven-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  Formula  | keystrokes  | keystroke count

|
|

1+2×3 |

| 6

sin⁡30+2×cos⁡30 |

| 10
5−3 |  | 4
15+10+10+10 |  | 12

The first two 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 for scientific calculators, where operator precedence is observed. Different forms of operator precedence schemes exist. In the algebraic entry system with hierarchy (AESH),[7] the precedence of basic mathematical operators is taken into account,[7] whereas calculators with algebraic entry system with parentheses (AESP)[7] support the entry of parentheses.[7] An input scheme known as algebraic 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 and , 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.

This TI-30XA scientific calculator uses immediate execution. It has a one-line, seven-segmented display, and cannot display operands or allow the entries to be edited.

### Examples of difficulties

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 the 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

The potential problems with immediate-execution calculators stem from the fact that they are imperative. This means that the user must provide details of how 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 more declarative. This means that the user should be able to specify only what has to be done, not how, and in which order, it has to be done.

Formula calculators are more declarative because the typed-in formula specifies what is to be done, and the user does not have to provide any details of the step-by-step order in which the calculation has to be performed.

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

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

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 answer 3,86‾. 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 a dot-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.

Most graphing calculators by Casio and Texas Instruments use this method. On its scientific calculators, Sharp calls this method Direct Algebraic Logic (D.A.L.),[15] Casio calls this method the Visually Perfect Algebraic Method (V.P.A.M.),[16] and Texas Instruments calls it the Equation Operating System (EOS).[8]

Examples  Formula  | keystrokes  | keystroke count

|
|

1+2×3 |  | 6
sin⁡30+2×cos⁡30 |  | 10
(1+2)×(3+4) |  | 12
15+10+10+10 |  | 12

## Reverse Polish notation

Screenshot of an RPN Calculator program on Linux. The Hewlett-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.

In reverse Polish notation,[7] also known as postfix notation, all operations are entered after the operands 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 a stack, one can enter formulas without the need to rearrange operands.

Hewlett-Packard's calculators are well-known examples among calculators which use RPN. Early models, such as the HP-35, used RPN entirely without any alternative methods. Later models can switch between RPN and another notation, such as the HP-12C Platinum which includes both RPN and immediate execution (with operations performed strictly in the order in which inputs are entered), the HP 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 the HP 35s with both RPN and standard algebraic infix notation.

Examples  Formula  | keystrokes  | keystroke count

|
|

1+2×3 |
| 7

sin⁡30+2×cos⁡30 |  | 9
(1+2)×(3+4) |  | 9
15+10+10+10 |

| 12
11 (RPL and Entry 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

Main article: BASIC

The equation entry screen on a TI-89, showing the brackets after the ln, sin and cos parameters. If these were left out, the equation would be interpreted as ln⁡(|t|+sin⁡(t+cos⁡(t))) instead of ln⁡(|t|)+sin⁡(t)+cos⁡(t)

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

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

In BASIC notation, the formula is entered as it would be entered in BASIC, using the `PRINT` command – the `PRINT` 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  Formula  | keystrokes  | keystroke count

|
|

1+2×3 |  | 6
sin⁡30×cos⁡30 |

| 12

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

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.

The ten-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 as Sharp,[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 use ten key typing speed as an employment criterion.

Examples  Formula  | keystrokes  | keystroke count

|
|

1+2×3 |  | 8
sin⁡30×cos⁡30 |  | 8
5−3 |  | 5
15+10+10+10 |  | 9

## Mathematical display

A Casio Natural Display scientific calculator displaying mixed fractions and their decimal equivalents in pretty-printing.

See also: Prettyprint

Pretty-printed commands used to plot Dini'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 that fractions, surds and integrals, 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 feature Natural Display or Natural textbook display,[24][25] but now uses Natural-VPAM.[26] Sharp calls this WriteView[27] on its scientific calculators and simply Equation Editor on its graphing calculators.[28] HP calls this its Textbook display setting,[29] which can be used in both RPN and Algebraic mode and in both the Stack and in the Equation Writer application.[30] Mathematica calls this Semantic-Faithful Typesetting.[31] Mathcad calls this standard math notation.[32] Maple has a Math Equation Editor,[33] but does not have a special name for this input method. Texas Instruments calls it MathPrint,[34] incorporating it in its high-end calculators, such as the TI-Nspire series, and in 2011 added the feature to its TI-84 series with the 2.55 OS update.[35]

Examples  Formula  | Keystrokes  | Keystroke Count

|
|

1+2×3 |  | 6
sin⁡30×cos⁡30 |

| 9

5−3 |  | 4
15+10+10+10 |  | 12

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 display `SIN(30)×COS(30)` before is pressed.

## See also

* Calculator
* Comparison of software calculators
* Computer algebra system
* Graphing calculator
* Keystroke programming
* Mathematical notation
* Pocket computer
* Programmable calculator
* Scientific calculator

## References

1. ↑ Microsoft's Windows Operating System Calculator Accessory; 2001. Available on a Windows PC at: Start/All Programs/Accessories/Calculator.
2. ↑ MotionNET Calculator page on the Internet ; 2006.
3. ↑ Flow Simulation Ltd Virtual Calc98 page on the Internet; 2008.
4. ↑ Formula Calculators Pty Ltd [Home page on the Internet]; 2009.
5. ↑ Moisey Oysgelt JavaScript Formula Calculator page on the Internet; 2000.
6. ↑ Haxial Software Pty Ltd Calculator Product page on the Internet ; 2001
7. ↑ 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 Algorithms for RPN calculators (1 ed.). Cambridge, Massachusetts, USA: Wiley-Interscience, John Wiley & Sons, Inc.. 1978. ISBN 0-471-03070-8. https://archive.org/details/algorithmsforrpn0000ball. Retrieved 2023-09-21.
8. ↑ 8.0 8.1 "Differences Between Algebraic Operating System (AOS) and Equation Operating System (EOS)". Texas Instruments. https://education.ti.com/en/customer-support/knowledge-base/ti-83-84-plus-family/product-usage/12705.
9. ↑ "A new calculator and why it is necessary". London, UK: Computing Science, Middlesex University. September 1998. http://www.uclic.ucl.ac.uk/harold/srf/allcalcs.pdf.
10. ↑ "Truth and Clarity in Arithmetic". University of Tasmania. 2003. http://standards.computer.org/sabminutes/2003Wint/Truth and Clarity in Arithmetic - Neville Holmes.pdf.
11. ↑ "Professor devises easier calculator". United Press International. 2005-06-27. http://www.physorg.com/news4773.html.
12. ↑ "Declarative Programming – Strategies for Solving Software Problems". July 2006. http://www.articlesalley.com/article.detail.php/7013/178/Education/Internet/36/Declarative_Programming_-_Strategies_for_Solving_Software_Problems.
13. ↑ Programming language concepts and paradigms. Prentice Hall International Series in Computer Science. Prentice Hall. 1990. ISBN 978-0-13728874-8.
14. ↑ "Expressive Power of Declarative Programming Languages". Department of Computer Science, University of York. October 1998. https://citeseerx.ist.psu.edu/pdf/692970d16d93c76d57458a77fc2231cc94d9db97.
15. ↑ "SHARP". https://global.sharp/contents/calculator/features/standard/dal/index.html. ,
16. ↑ "General - Standard Scientific calculators - Calculators - CASIO". https://support.casio.com/answer.php?rgn=5&cid=004002002001&qid=24370&num=7.
17. ↑ 17.0 17.1 "HP RPN Evolves". HP Solve (Hewlett-Packard Development Company, L.P.) (27): 42–45. April 2012. http://h20331.www2.hp.com/hpsub/downloads/S07 HP RPN Evolves V5b.pdf. Retrieved 2022-10-20. [1] (4 of 56 pages)
18. ↑ The picture of the Casio FX-880P shows sin, cos and tan keys on the second row right hand side.
19. ↑ The picture of the Sharp PC-1245 shows no trigonometric keys
20. ↑ "SIICA.sharpusa.com > Resources > More Products > Calculators". http://siica.sharpusa.net/Business-Products/Calculators.
21. ↑ "Award-Winning Judy's TenKey Accounting Calculator for Windows". https://www.judysapps.com/TenKey.htm.
22. ↑ "Ten Key Certificate on Learn2Type.com!". https://www.learn2type.com/typingtest/tenkeycertificate.cfm.
23. ↑ "None". http://www.abbyinc.com/abbyinc/KeyPro.asp.
24. ↑ Natural textbook display - Scientific calculator.
25. ↑ "CASIO WEW Worldwide Education Website". http://edu.casio.com/.
26. ↑ Natural Visually Perfect Algebraic Mode (V.P.A.M) - Scientific calculator .
27. ↑ WriteView.
28. ↑ Sharp Graphing equation editor.
29. ↑ "HP Support document - HP Support Center". http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01943918.
30. ↑ http://h20331.www2.hp.com/Hpsub/downloads/50gUsing_the_EquationWriter_Part2.pdf.
31. ↑ Semantic-Faithful Typesetting.
32. ↑ Mathcad .
33. ↑ "Math Equation Editor - Maple Features - Maplesoft". https://www.maplesoft.com/products/maple/features/feature_detail.aspx?fid=5907.
34. ↑ "TI Products | Graphing Calculators | Scientific Calculators". https://education.ti.com/en/products.
35. ↑ "Texas Instruments releases new OS for TI-84, 2.55 MP" (in en-us). 2011-01-14. https://www.techpoweredmath.com/new-os-ti-84-255-mp/.

## Further reading

* "Human behaviour and performance in calculator use with Algebraic and Reverse Polish Notation". Ergonomics (Department of Industrial Engineering, State University of New York at Buffalo, Amherst, New York, USA: Taylor & Francis) 22 (9): 1011–1019. 1979. doi:10.1080/00140137908924675. ISSN 0014-0139. (9 pages)
* "Advanced Calculator Logic HP RPN/Algebraic: A Comparative Analysis.". Corvallis, Oregon, USA: Hewlett-Packard Corporation. 1979. http://archive.computerhistory.org/resources/access/text/2016/05/102651973-05-01-acc.pdf. (13 pages)
* "Electronic calculators: which notation is the better?". Applied Ergonomics (Department of Industrial Engineering, University at Buffalo, State University of New York, USA: IPC Business Press) 11 (1): 2–6. March 1980. doi:10.1016/0003-6870(80)90114-3. 0003-6870/80/01 0002-05. ISSN 0003-6870. PMID 15676368. https://www.keesvandersanden.nl/calculators/downloads/Electronic-calculators-which-notation-is-the-better.pdf. Retrieved 2018-09-22. (5 pages)
* Calculators: A Categorized Compilation of References. Supplement 1.. Columbus, Ohio, USA: Calculator Information Center, Ohio State University. December 1980. ED199087. SE034434. https://files.eric.ed.gov/fulltext/ED199087.pdf. Retrieved 2022-10-16. (64 pages)
* "Interruption as a test of the user-computer interface". written at Department of Engineering Design, Tufts University, Medford, Massachusetts, USA. Proceedings of the Seventeenth Annual Conference on Manual Control. University of California, Los Angeles, California, USA: Jet Propulsion Laboratory / Office of Naval Research / NASA. 1981-10-15. pp. 655–667. 02155, N82-13721, 82N13721, 19820005848, JPL 81-95. https://ntrs.nasa.gov/api/citations/19820005848/downloads/19820005848.pdf. Retrieved 2018-09-22. Proceedings of the Seventeenth Annual Conference on Manual Control: University of California, Los Angeles, June 16-18, 1981 (13 of 702 pages)
* "Hand Calculator Performance Under Interrupted Operation". Proceedings of the Human Factors Society Annual Meeting (Department of Engineering Design, Tufts University, Medford, Massachusetts, USA) 25 (1): 329–332. October 1981. doi:10.1177/107118138102500187. (4 pages)
* "The machine inside the machine: Users' models of pocket calculators". International Journal of Man-Machine Studies 15 (1): 51–85. July 1981. doi:10.1016/S0020-7373(81)80023-5. ISSN 0020-7373. (35 pages)
* "Artificial Intelligence: Conceptual Models of Ill-Defined Systems". written at University of Massachusetts, Amherst, Massachusetts, USA; MRC Applied Psychology Unit, Cambridge, UK. Adaptive Control of Ill-Defined Systems. NATO Conference Series (NATOCS, volume 16); II Systems Science (SYSC) (1st illustrated ed.). New York & London: Plenum Press, Plenum Publishing Corporation / Springer. 1984. pp. 165–176. doi:10.1007/978-1-4684-8941-5. ISBN 978-1-4684-8943-9. https://books.google.com/books?id=e5XuBwAAQBAJ&pg=PA165. Retrieved 2022-12-26. (12 pages)
* "Calculator logic: when and why is RPN superior to algebraic?". Applied Ergonomics (Elsevier Science Ltd.) 25 (5): 327–333. 1994. doi:10.1016/0003-6870(94)90048-5. ISSN 0003-6870. (7 pages)
* Wozniak, Stephen Gary "Woz", ed (2012). "In our AP C++ class we are trying to use virtual stacks to develop an infix to postfix calculator translator. To study how exactly the infix notation and postfix notation differ we used one of the very old HP calculators. I was wondering that when you worked for HP did you help develop some postfix calculators? Do you prefer infix notation or postfix?". woz.org. http://archive.woz.org:80/letters/general/57.html. "[…] Our marketing department had a card with a monstrous formula to demonstrate how powerful our calculators were and what postfix calculation was capable of. They challenged people to solve it on a slide rule the normal way. Well, we could all solve it on our HP calculators but it took a few tries to get the steps accurate enough […] Finally Texas Instruments introduced an infix 'algebraic entry' scientific calculator. […] We were all […] laughing at the arithmetic entry as being too weak for engineers. […] our big formula challenge […], sure that nobody could ever do it with the TI calculator. A challenge went up for someone to try. After a short silence I said that I'd try. […] My colleagues couldn't believe it. I told them that you just copy the formula from left to right but not one of them could see through their postfix fog. After all, these were the calculator experts of the world. They are well accustomed to thinking ahead and analyzing an expression to come up with the order of steps to take on an HP postfix calculator, and they had to remember which sub-expressions were in what order on the calculator's stack. None of them could do what I had done, forget that they have to be smart. […]"
* "RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic". 2005-02-12. http://www.xnumber.com/xnumber/rpn_or_adl.htm.
* ""Order of operations" and other oddities in school mathematics". Berkeley, California, USA: Department of Mathematics, University of California. 2007-09-13. https://math.berkeley.edu/~wu/order5.pdf. (11 pages)
* Order of Operations and RPN (Expository paper). Master of Arts in Teaching (MAT) Exam Expository Papers. Lincoln, Nebraska, USA: University of Nebraska. July 2007. Paper 46. https://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1045&context=mathmidexppap. Retrieved 2020-06-14. (1+2+17 pages)
* (in de) Keller, Stack und automatisches Gedächtnis – eine Struktur mit Potenzial (Tagungsband zum Kolloquium 14. November 2014 in Jena). GI Series: Lecture Notes in Informatics (LNI) – Thematics. T-7. Bonn, Germany: Gesellschaft für Informatik (GI) / Köllen Druck + Verlag GmbH. 2015. ISBN 978-3-88579-426-4. https://dl.gi.de/bitstream/handle/20.500.12116/4381/lni-t-7.pdf?sequence=1&isAllowed=y. Retrieved 2020-04-12. [2] (77 pages)

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Calculator input methods. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Calculator_input_methods&oldid=209131"