Formula calculator: Difference between revisions

Content deleted Content added
No edit summary
Adding local short description: "Software calculator that can evaluate expressions", overriding Wikidata description "software calculator that can perform a calculation in two steps"
 
(20 intermediate revisions by 14 users not shown)
Line 1:
{{Short description|Software calculator that can evaluate expressions}}
[[File:Wi-Fi challenge Pi equation in microMathematics Plus 2.15.6 on Android 2.3.png|thumb|right|microMathematics Plus on Android displaying a formula for a popular Wi-Fi password challenge. The formula is entered first, and requires operator precedence — multiplications and divisions precede additions and subtractions.]]
A '''formula calculator''' is a [[software calculator]] that can perform a calculation in two steps:
 
Line 9 ⟶ 11:
 
== How they work ==
 
Formulas as they are commonly written use [[infix notation]] for [[binary operators]], such as addition, multiplication, division and subtraction. This notation also uses:
 
Line 32 ⟶ 33:
 
== Types of calculator ==
 
The formula calculator concept can be applied to all types of calculator, including arithmetic, scientific, statistics, financial and conversion calculators.
 
Line 43:
 
== 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:
 
Line 50 ⟶ 49:
 
== Declarative and imperative tools ==
Button-operated calculators are [[imperative programming|imperative]], because the user must provide details of how the calculation has to be performed.<ref name="Reference 13">[[Harold Thimbleby]]. 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: [httphttps://web.archive.org/web/20070207044654/http://www.uclic.ucl.ac.uk/harold/srf/allcalcs.pdf web.archive.org][https://agecalculator.com]</ref>
 
On the other hand, formula calculators are more [[declarative programming|declarative]], because the typed-inentered 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.
Button-operated calculators are [[imperative programming|imperative]], because the user must provide details of how the calculation has to be performed.<ref name="Reference 13">[[Harold Thimbleby]]. 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: [http://web.archive.org/web/20070207044654/http://www.uclic.ucl.ac.uk/harold/srf/allcalcs.pdf web.archive.org]</ref>
 
Declarative solutions are easier to understand than imperative solutions,<ref name=" Reference 13"/><ref>Roy E. Furman. Declarative Programming - Strategies for Solving Software Problems, http://www.articlesalley.com {{webarchive|url=http://webarchive.loc.gov/all/20121220085209/http%3A//www.articlesalley.com/ |date=2012-12-20 }}, July 2006. Available from: {{cite web |url= http://www.articlesalley.com/article.detail.php/7013/178/Education/Internet/36/Declarative_Programming_-_Strategies_for_Solving_Software_Problems |title=Declarative Programming - Strategies for Solving Software Problems |accessdate=2009-05-04 |url-status=dead |archiveurl= https://archive.today/20120723100846/http://www.articlesalley.com/article.detail.php/7013/178/Education/Internet/36/Declarative_Programming_-_Strategies_for_Solving_Software_Problems |archivedate=2012-07-23}}</ref> and so there has been a long-term trend from imperative to declarative methods.<ref>David A. Watt. Programming language concepts and paradigms, Prentice Hall, 1990 (citation 13 at http://citeseer.ist.psu.edu/context/14802/0)</ref><ref> 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)</ref> Formula calculators are part of this trend.
On the other hand, formula calculators are more [[declarative programming|declarative]] because the typed-in 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,<ref name=" Reference 13"/><ref>Roy E. Furman. Declarative Programming - Strategies for Solving Software Problems, http://www.articlesalley.com, July 2006. Available from: http://www.articlesalley.com/article.detail.php/7013/178/Education/Internet/36/Declarative_Programming_-_Strategies_for_Solving_Software_Problems</ref> and so there has been a long-term trend from imperative to declarative methods.<ref>David A. Watt. Programming language concepts and paradigms, Prentice Hall, 1990 (citation 13 at http://citeseer.ist.psu.edu/context/14802/0)</ref><ref> 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)</ref> 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.
 
== Hybrid calculators ==
There are hybrid calculators that combine typed-in formulaformulae and button-operated calculation. For example:
 
There are hybrid calculators that combine typed-in formula 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.
Line 68 ⟶ 65:
 
== See also ==
 
* [[Software calculator]]
* [[Comparison of software calculators]]
Line 77 ⟶ 73:
 
== References ==
 
<references/>