HOME

TheInfoList



OR:

A formula calculator is a
software calculator A software calculator is a calculator that has been implemented as a computer program, rather than as a physical hardware device. They are among the simpler interactive software tools, and, as such, they provide operations for the user to sele ...
that can perform a calculation in two steps: # Enter the calculation by typing it in from the keyboard. # Press a single button or key to see the final result. This is unlike button-operated
calculators An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics. The first solid-state electronic calculator was created in the early 1960s. Pocket-sized ...
, such as the
Windows calculator Windows Calculator is a software calculator developed by Microsoft and included in Windows. In its Windows 10 incarnation it has four modes: standard, scientific, programmer, and a graphing mode. The standard mode includes a number pad and button ...
or the Mac OS X calculator, which require the user to perform one step for each operation, by pressing buttons to calculate all the intermediate values, before the final result is shown. In this context, a formula is also known as an
expression Expression may refer to: Linguistics * Expression (linguistics), a word, phrase, or sentence * Fixed expression, a form of words with a specific meaning * Idiom, a type of fixed expression * Metaphorical expression, a particular word, phrase, ...
, and so formula calculators may be called ''expression'' calculators. Also in this context, calculation is known as ''evaluation'', and so they may be called formula ''evaluators'', rather than ''calculators''.


How they work

Formulas as they are commonly written use
infix notation Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of operators between operands—"infixed operators"—such as the plus sign in . Usage Binary relations are ...
for
binary operators In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, an internal binary op ...
, such as addition, multiplication, division and subtraction. This notation also uses: *
Parentheses A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. Typically deployed in symmetric pairs, an individual bracket may be identified as a 'left' or 'r ...
to enclose parts of a formula that must be calculated first. * In the absence of parentheses,
operator precedence In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression. For exam ...
, so that higher precedence operators, such as multiplication, must be applied before lower precedence operators, such as addition. For example, in 2 + 3*4, the multiplication, 3*4, is done first. * Among operators with the same precedence,
associativity In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement ...
, so that the left-most operator must be applied first. For example, in 2 - 3 + 4, the subtraction, 2 - 3, is done first. Also, formulas may contain: *
Non-commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
operators that must be applied to numbers in the correct order, such as subtraction and division. * The same symbol used for more than one purpose, such as - for negative numbers and subtraction. Once a formula is entered, a formula calculator follows the above rules to produce the final result by automatically: * Analysing the formula and breaking it down into its constituent parts, such as operators, numbers and parentheses. * Finding both
operands In mathematics, an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on. Example The following arithmetic expression shows an example of operators and operands: :3 + 6 = 9 In the above examp ...
of each binary operator. * Working out the values of these operands. * Applying the operator to these values, in the correct order so as to allow for non-commutative operators. * Evaluating the parts of a formula in parentheses first. * Taking operator precedence and associativity into account. * Distinguishing between different uses of the same symbol.


Types of calculator

The formula calculator concept can be applied to all types of calculator, including arithmetic, scientific, statistics, financial and conversion calculators. The calculation can be typed or pasted into an edit box of: *A software package that runs on a computer, for example as a dialog box. *An on-line formula calculator hosted on a web site. It can also be entered on the command line of a programming language.


Related software packages

Although they are not calculators in themselves, because they have a much broader feature set, many software tools have a formula-calculation capability, in that a formula can be typed in and evaluated. These include: *
Spreadsheets A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in cel ...
, where a formula can be entered to calculate a cell’s content. *
Databases In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
, where a formula can be used to define the value of a calculated field in a record.


Declarative and imperative tools

Button-operated calculators are imperative, because the user must provide details of how the calculation has to be performed.
Harold Thimbleby Harold W. Thimbleby (born 19 July 1955) is a British professor of computer science at Swansea University, Wales. He is known for his works on user interface design within the realm of human computer interaction. Overview Harold Thimbl ...
. A new calculator and why it is necessary, Computing Science, Middlesex University, London, UK, September 1998. Available from: http://www.uclic.ucl.ac.uk/harold/srf/allcalcs.pdf Archived at
web.archive.org
/ref> On the other hand, formula calculators are more declarative, because the entered formula specifies what to do, 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, and so there has been a long-term trend from imperative to declarative methods.Tatsuru Matsushita. Expressive Power of Declarative Programming Languages, PhD thesis, Department of Computer Science, University of York, October 1998 (citation 13 at http://citeseer.ist.psu.edu/context/14802/0) Formula calculators are part of this trend. Many software tools for the general user, such as
spreadsheets A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in cel ...
, are declarative. Formula calculators are examples of such tools.


Hybrid calculators

There are hybrid calculators that combine typed-in formulae and button-operated calculation. For example: *Calculations can be entered entirely from the keyboard, or operations can be applied to typed-in numbers or formulas using buttons, in the same calculator. *Formulas can be constructed using buttons, rather than being entered from the keyboard. *Formula copies of button-operated calculations can be created, saved and re-loaded for application to different numbers.


See also

*
Software calculator A software calculator is a calculator that has been implemented as a computer program, rather than as a physical hardware device. They are among the simpler interactive software tools, and, as such, they provide operations for the user to sele ...
*
Comparison of software calculators This is a list of notable software calculators. Immediate execution calculators (button-oriented) Expression or formula calculators (command-line oriented) See also * Software calculator * Calculator input methods * Formula calculator * C ...
*
Calculator An electronic calculator is typically a portable electronic device used to perform calculations, ranging from basic arithmetic to complex mathematics. The first solid-state electronic calculator was created in the early 1960s. Pocket-size ...
*
Calculator input methods 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 resul ...
*
Programmable calculator Programmable calculators are calculators that can automatically carry out a sequence of operations under control of a stored program. Most are Turing complete, and, as such, are theoretically general-purpose computers. However, their user inte ...
*
Scientific calculator A scientific calculator is an electronic calculator, either desktop or handheld, designed to perform mathematical operations. They have completely replaced slide rules and are used in both educational and professional settings. In some area ...


References

Calculators Office equipment Mathematical notation