Home

infix

Infix is a form of notation in which an operator is placed between its operands. In mathematics and many programming languages, the familiar expression 3 + 4 uses the plus operator between the operands 3 and 4. Infix notation is the dominant form for expressing binary operations.

By contrast, prefix notation (Polish) places the operator before its operands, as in + 3 4, while

Infix expressions require rules of precedence and associativity to determine evaluation order. Parentheses can override these

Parsing infix notation is more intricate than parsing prefix or postfix forms because of operator precedence

In mathematics and logic, infix notation aligns with conventional reading and human intuition, making it the

postfix
notation
(Reverse
Polish)
places
the
operator
after
its
operands,
as
in
3
4
+.
Infix
is
generally
preferred
for
readability,
especially
in
complex
expressions,
but
prefix
and
postfix
forms
are
often
used
in
computer
science
contexts
such
as
parsing
and
evaluation.
rules,
clarifying
the
intended
grouping.
Common
operators
include
addition,
subtraction,
multiplication,
division,
and
comparison;
exponentiation
may
be
written
as
^
or
**
depending
on
the
language.
Some
languages
also
support
infix
assignment
operators,
such
as
a
=
b
+
c,
and
augmented
assignments
like
a
+=
b.
and
associativity.
Techniques
such
as
the
Shunting-yard
algorithm
or
construction
of
expression
trees
are
used
to
convert
infix
expressions
into
a
form
suitable
for
evaluation.
standard
choice
for
expressing
most
arithmetic
and
logical
operations.