next up previous
Next: Order of Operations and Up: The basic commands Previous: Numbers and Variables

Operations

Natural Math supports a large set of operations from mathematics. The arithmetic operators:

a + b, a plus b, a - b, a minus b,


\begin{displaymath}
a + b , \ a + b , \ a - b , \ a - b , \
\end{displaymath}

a * b, a times b, a / b, a divide b,


\begin{displaymath}
a \times b , \ a \times b , \ a / b , \ a \div b , \
\end{displaymath}

a ^ b, a power b, a . b, a dot b


\begin{displaymath}
{a} ^ {b} , \ {a} ^ {b} , \ a \cdot b , \ a \cdot b
\end{displaymath}

The fraction operator, and the implicit multiplication operator: (in the case of the implicit multiplication operator, the space between the two quantities can be crucual if they are both letter variables or numbers):

a over b, a b


\begin{displaymath}
\frac {a} {b} , \ a b
\end{displaymath}

The relational operators:

a = b, a eq b, a <= b, a le b, a >= b, a > b,


\begin{displaymath}
a = b , \ a = b , \ a \le b , \ a \le b , \ a \ge b , \ a > b , \
\end{displaymath}

a <> b, a ne b, a < b, a lt b, a > b, a gt b


\begin{displaymath}
a \ne b , \ a \ne b , \ a < b , \ a < b , \ a > b , \ a > b
\end{displaymath}

Other operators (the last one tells you that the comma is considered as an operator):

a _ b, a sub b, a subst b, a -> b, a to b, a tendsto b, 
a , b, a comma b


\begin{displaymath}
{a} _ {b} , \ {a} _ {b} , \ \left.a\right\vert _{b} , \ a \to b , \ a \to b , \ a \to b , \ a , \ b , \ a , \ b
\end{displaymath}

The plus and minus can also appear at the beginning of some expressions:

a * (-b) , a^+b


\begin{displaymath}
a \times \left( - b \right) , \ {a} ^ { + b}
\end{displaymath}

Operations can appear right at the beginning of the formula, like comma, the relational operators, and plus/minus.

= a + b


\begin{displaymath}
= a + b
\end{displaymath}

Also, an operation can be left `dangling' at the end of input:

a+


\begin{displaymath}
a +
\end{displaymath}

The value of these last two allowable activities is to let long formulae range over several lines. This is illustrated in the long example given is Section 2.

Finally, the operations plus and minus may be used in a contex where they are treated as quantities. This allows expressions like

a to 4^+ , b = 3_-


\begin{displaymath}
a \to {4} ^ {+} , \ b = {3} _ {-}
\end{displaymath}


next up previous
Next: Order of Operations and Up: The basic commands Previous: Numbers and Variables
Stephen Montgomery-Smith 2003-05-26