%%  File:  errorsGuide.tex
%%
%%  Study Guide for Numerical Methods with MATLAB
%%  Chapter on "Unavoidable Errors in Computing"
%%
%%  Gerald Recktenwald,  gerry@me.pdx.edu
%%  October 2000


\documentclass{article}

\usepackage{studyGuide}
\renewcommand{\guideName}{Study Guide for Unavoidable Errors in Computing}


\title{Study Guide for\\
       Unavoidable Errors in Computing}
\author{Gerald Recktenwald}

\newcounter{enumSave}


\begin{document}

%\maketitle

% -------------------------
\section*{Bare Essentials}
At the end of this chapter you should be able to
\begin{enumerate}
    \item   List the digits used in base two arithmetic.
    \item   Give a simple explanation of the term ``floating point number''.
    \item   Give two examples of numbers that would need to be stored in
            floating point format in a computer.  What other format is used
            for numerical data?  Give two examples of this other format.
            %  1.2,  3.14159
            %  integer: 2, 4
    \item   Give a definition of ``roundoff error''.
    \item   Explain the expression, ``There are holes in the floating
            point number line''.
    \item   Explain why integer arithmetic is ``exact''?
    \item   Describe why floating point arithmetic is not ``exact''.
    \item   Give a simple explanation of overflow.
    \item   Give a simple expression that defines machine precision, \epsm.
            % \[
            %       1 + \delta = 1 \ \ \ \ \ \text{for}\ \ \ \delta<\epsm
            % \]
    \item   Give the value of \epsm\ for exact arithmetic.
    \item   Write the formulas for computing the relative and absolute errors
            if $\alpha$ is an exact (scalar) value, and $\hat{\alpha}$ is
            its floating point approximation.
    \item   Identify the truncation error of a Taylor series expansion.

\setcounter{enumSave}{\value{enumi}}
\end{enumerate}

% -------------------------
\bigskip
\noindent A minimal working knowledge of \MATLAB\ requires that you can
\begin{enumerate}
\setcounter{enumi}{\value{enumSave}}
    \item   Name the built in variable that holds the value \epsm.
    \item   Given the value of \epsm\ for computations in \MATLAB.
    \item   Write a simple, but carefully coded \texttt{if} statement that determines
            whether two scalar values are close enough to be considered equal.
\end{enumerate}


% -------------------------
\section*{An Expanded Core of Knowledge}
After mastering the bare essentials you should move on to a deeper understanding
of the fundamentals.  Doing so involves being able to
\begin{enumerate}
    \item   Give a definition and one example of catastrophic cancellation error.
            %  $1/(a-b)$ when $a\approx b$
    \item   Identify (at least) two important differences between symbolic and numeric
            computations.
            % \begin{itemize}
            %   \item   Symbolic uses arbitrary precision, whereas numeric uses
            %           fixed precision.  $\therefore$ symbolic can do exact math
            %   \item   Symbolic computation uses algebraic rules whereas numeric
            %           computation uses only $+$, $-$, $\times$,
            %           $/$ and comparison operations.
            % \end{itemize}
    \item   Write an expression that combines an absolute \emph{and} relative tolerance to
            compare computed result with a target or exact value.  Let $\alpha$ be the exact
            (scalar) value, and $\hat{\alpha}$ be its floating point approximation.
    \item   Use an infinite series to give an example of truncation error.
    \item   Use order notation to express truncation error.
\end{enumerate}


% -------------------------
\section*{Developing Mastery}
A mastery of computational errors requires that you
\begin{enumerate}
    \item   Readily convert between binary and decimal notation
    \item   Can sketch the floating point number line and label
            its major features.
    \item   Explain the difference between generating a denormal and
            rounding to zero.
    \item   Be able to distinguish the effects of roundoff and truncation errors
            in a computed result, for example, by viewing a plot such as
            Figure~(5.4)
\end{enumerate}


\end{document}
