Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Infix notation

From Wikipedia, the free encyclopedia
Mathematics notation with operators between operands

Infix notation

Infix notation is the notation commonly used inarithmetical andlogical formulae and statements. It is characterized by the placement ofoperators betweenoperands—"infixed operators"—such as theplus sign in2+ 2.

Usage

[edit]

Binary relations are often denoted by an infix symbol such asset membershipaA when the setA hasa for an element. Ingeometry,perpendicular linesa andb are denotedab ,{\displaystyle a\perp b\ ,} and inprojective geometry two pointsb andc are inperspective whenb  c{\displaystyle b\ \doublebarwedge \ c} while they are connected by a projectivity whenb  c.{\displaystyle b\ \barwedge \ c.}

Infix notation is more difficult toparse by computers thanprefix notation (e.g.+ 2 2) orpostfix notation (e.g. 2 2+). However manyprogramming languages use it due to its familiarity. It is more used in arithmetic, e.g. 5× 6.[1]

Further notations

[edit]

Infix notation may also be distinguished fromfunction notation, where the name of a function suggests a particular operation, and itsarguments are the operands. An example of such afunction notation would beS(1, 3) in which the functionS denotes addition ("sum"):S (1, 3) = 1 + 3 = 4.

Order of operations

[edit]

In infix notation, unlike in prefix or postfix notations,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 theorder of operations.

See also

[edit]

References

[edit]
  1. ^"The Implementation and Power of Programming Languages". Archived fromthe original on 27 August 2022. Retrieved30 August 2014.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Infix_notation&oldid=1276210438"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp