111 lines
2.3 KiB
TeX
111 lines
2.3 KiB
TeX
\section{Introduction}
|
|
The following is an excerpt from Vladimir Nabokov's
|
|
autobiography {\it Speak, Memory.}
|
|
\begin{quote}
|
|
A foolish tutor had explained logarithms to me much too early, and I had
|
|
read (in a British publication, the {\it Boy's Own Paper}, I believe)
|
|
about a certain Hindu calculator who in exactly two seconds could find the
|
|
seventeenth root of, say,
|
|
3529471145 760275132301897342055866171392
|
|
(I am not sure I have got this right; anyway the root was 212).
|
|
\end{quote}
|
|
We can check Nabokov's arithmetic by typing the following into Eigenmath.
|
|
|
|
\medskip
|
|
\verb$212^17$
|
|
|
|
\medskip
|
|
\noindent
|
|
After pressing the return key, Eigenmath displays the following result.
|
|
$$3529471145760275132301897342055866171392$$
|
|
So Nabokov did get it right after all.
|
|
We can enter {\it float} or click on the float button to scale the number
|
|
down to size.
|
|
|
|
\medskip
|
|
\verb$float$
|
|
$$3.52947\times10^{39}$$
|
|
|
|
\medskip
|
|
\noindent
|
|
Now let us see if Eigenmath can find the
|
|
seventeenth root of this number, like the Hindu calculator could.
|
|
|
|
\medskip
|
|
\verb$N=212^17$
|
|
|
|
\verb$N$
|
|
$$N=3529471145760275132301897342055866171392$$
|
|
|
|
\verb$N^(1/17)$
|
|
$$212$$
|
|
|
|
\medskip
|
|
\noindent
|
|
It is worth mentioning that when a symbol is assigned a value,
|
|
no result is printed.
|
|
To see the value of a symbol, just evaluate it by putting it on a line by
|
|
itself.
|
|
|
|
\medskip
|
|
\verb$N$
|
|
$$N=3529471145760275132301897342055866171392$$
|
|
|
|
\newpage
|
|
|
|
\subsection{Negative exponents}
|
|
Eigenmath requires parentheses around negative exponents.
|
|
For example,
|
|
|
|
\medskip
|
|
\verb$10^(-3)$
|
|
|
|
\medskip
|
|
\noindent
|
|
instead of
|
|
|
|
\medskip
|
|
\verb$10^-3$
|
|
|
|
\medskip
|
|
\noindent
|
|
The reason for this is that the binding of the negative sign is not always
|
|
obvious.
|
|
For example, consider
|
|
|
|
\medskip
|
|
\verb$x^-1/2$
|
|
|
|
\medskip
|
|
\noindent
|
|
It is not clear whether the exponent should be $-1$ or $-1/2$.
|
|
So Eigenmath requires
|
|
|
|
\medskip
|
|
\verb$x^(-1/2)$
|
|
|
|
\medskip
|
|
\noindent
|
|
which is unambiguous.
|
|
|
|
\medskip
|
|
\noindent
|
|
Now a new question arises.
|
|
Never mind the minus sign, what is the binding of the caret symbol itself?
|
|
The answer is, it binds to the first symbol that follows it and nothing else.
|
|
For example, the following is parsed as $(x^1)/2$.
|
|
|
|
\medskip
|
|
\verb$x^1/2$
|
|
|
|
$$\hbox{$1\over2$}x$$
|
|
|
|
\medskip
|
|
\noindent
|
|
So in general, parentheses are needed when the exponent is an expression.
|
|
|
|
\medskip
|
|
\verb$x^(1/2)$
|
|
|
|
$$x^{1/2}$$
|
|
|