Content deleted Content added
m Undid revision 231010603 by 59.182.234.189 (talk) |
m Undid revision 1276203550 by 2600:6C58:7F:46EE:C52C:2EF7:27EC:1C66 (talk) |
||
(90 intermediate revisions by 69 users not shown) | |||
Line 1:
{{Short description|Mathematics notation with operators between operands}}
'''Infix notation''' is the notation commonly used in [[arithmetic]]al and [[logic]]al formulae and statements. It is characterized by the placement of [[Operator (mathematics)|operator]]s between [[operand]]s—"infixed operators"—such as the [[plus sign]] in {{nowrap|2 '''+''' 2}}.
In infix notation, unlike in prefix or postfix notations, [[Bracket#Parentheses_.28_.29|parentheses]] surrounding groups of operands and operators are necessary to indicate the intended order in which operations are to be performed. In the absence of parentheses, certain precedence rules determine the order of operations. These are explained in the [[order of operations]] article.▼
==
[[Binary relation]]s are often denoted by an infix symbol such as [[set membership]] ''a'' ∈ ''A'' when the set ''A'' has ''a'' for an element. In [[geometry]], [[perpendicular line]]s ''a'' and ''b'' are denoted <math>a \perp b \ ,</math> and in [[projective geometry]] two points ''b'' and ''c'' are in [[perspective (geometry)|perspective]] when <math>b \ \doublebarwedge \ c</math> while they are connected by a projectivity when <math>b \ \barwedge \ c .</math>
*postfix notation, also called [[Reverse Polish notation]]▼
*prefix notation, also called [[Polish notation]]▼
*[[Shunting yard algorithm]], used to convert infix notation to postfix notation or to a tree▼
Infix notation is more difficult to [[parsing|parse]] by computers than [[prefix notation]] (e.g. '''+''' 2 2) or [[postfix notation]] (e.g. 2 2 '''+'''). However many [[programming language]]s use it due to its familiarity. It is more used in arithmetic, e.g. 5 '''×''' 6.<ref name="Infix, Postfix and Prefix">{{cite web | url=http://www.cs.man.ac.uk/~pjj/cs212/fix.html | title=The Implementation and Power of Programming Languages | access-date=30 August 2014 | archive-url=https://web.archive.org/web/20220827171346/https://www.cs.man.ac.uk/~pjj/cs212/fix.html | archive-date=27 August 2022}}</ref>
==External links==▼
*[http://www.xnumber.com/xnumber/rpn_or_adl.htm ''RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic'']▼
==Further notations==
Infix notation may also be distinguished from [[Function (mathematics)|function]] notation, where the name of a function suggests a particular operation, and its [[Argument of a function|arguments]] are the operands. An example of such a [[Function application|function notation]] would be {{math|S(1, 3)}} in which the function {{math|S}} denotes addition ("sum"): {{math|1=S (1, 3) = 1 + 3 = 4}}.
[[Category:Mathematical notation]]▼
==Order of operations==
▲In infix notation, unlike in prefix or postfix notations, [[Bracket#
== See also ==
* [[Tree traversal]]: Infix (In-order) is also a tree traversal order. It is described in a more detailed manner on this page.
* [[Calculator input methods]]: comparison of notations as used by pocket calculators
▲* [[Shunting yard algorithm]], used to convert infix notation to postfix notation or to a tree
* [[Operator (computer programming)]]
* [[Subject–verb–object word order]]
==References==
{{Reflist}}
▲== External links ==
▲* [http://www.xnumber.com/xnumber/rpn_or_adl.htm ''RPN or DAL? A brief analysis of Reverse Polish Notation against Direct Algebraic Logic'']
*[https://web.archive.org/web/20130925214440/http://www.meta-calculator.com/learning-lab/how-to-build-scientific-calculator/infix-to-postifix-convertor.php Infix to postfix convertor]''[sic]''
▲[[Category:Mathematical notation]]
[[Category:Operators (programming)]]
|