Jump to content

Infix notation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 213.137.65.213 (talk) at 22:26, 16 January 2022 (Order of operations). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 2 + 2.

Usage

Binary relations are often denoted by an infix symbol such as set membership aA when the set A has a for an element. In geometry, perpendicular lines a and b are denoted and in projective geometry two points b and c are in perspective when while they are connected by a projectivity when

Infix notation is more difficult to parse by computers than prefix notation (e.g. + 2 2) or postfix notation (e.g. 2 2 +). However many programming languages use it due to its familiarity. It is more used in arithmetic, e.g. 5 × 6.[1]

Further notations

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

See also

References

  1. ^ "The Implementation and Power of Programming Languages". Retrieved 30 August 2014.