\documentstyle[12pt]{article}
%\documentstyle[12pt,ncs]{article}
\topmargin=-1.25in
\oddsidemargin=0in
%\evensidemargin=0in
\textwidth=6.5in
\textheight=10.5in
\parindent=0in
%\parskip=10pt
\pagestyle{empty}

%\newfont{\cmss}{cmss12.tfm}
\tolerance=3000
%\setcounter{chapter}{1}

\begin{document}

\input 370top

\centerline{{\it Class 3}: {\bf Friday September 4}}

\begin{description}
\item[SUMMARY] Floating Point Arithmetic 
\vspace*{-12pt}
\item[CURRENT READING] Burden \& Faires Sections 1.2 and 1.4
\end{description}

{\large\it Chopping versus Rounding}\\
Let's consider the relative error involved in using chopping versus rounding in the representation of machine numbers with $k$ decimal digits.\\

Any positive real number $y$ can be normalized to be written in the form
$$y = 0. d_1 d_2 d_3 \cdots d_k d_{k+1} \cdots \times 10^n$$
This is called a floating point number. It is clear that if one restricts the number of digits which can be used to represent the floating point number one will have to either perform chopping or rounding in order for the floating point number to ``fit'' the allotted memory of $k$ digits.\\

\underline{\bf Exercise}\\
Write down an expression which represents $\eps_{rel}$, the relative error involved in representing $y$ as a decimal machine number $fl(y)$ (i.e. a floating point number using a fixed number of decimal digits)
\vfill

{\bf Example}\\
(a) Write down what $fl(y)$ would look like if {\bf chopping} were implemented
\vfill
(b) Write down what $fl(y)$ would look like if {\bf rounding} were implemented
\vfill

\newpage
\underline{\sc Groupwork}\\
Show that the expression involving $k$ which gives you an upper bound for the relative error involved in using chopping arithmetic is $\eps_{rel} = 10^{-k+1}$
\vfill
\vfill
\vfill
{\bf Example}\\
It can be shown that a bound for the relative error involved in using {\bf rounding arithmetic} is {\it half} that for chopping, $\eps_{rel} = 0.5 \times 10^{-k+1} = 5 \times 10^{-k}$.
\vfill
\vfill
\vfill
\underline{\sc Groupwork}\\
Compute the following arithmetic operations using finite precision arithmetic.\\
Half the group should use five-digit chopping arithmetic and the other half five-digit ronding arithmetic.\\
Also compute the absolute and relative error from the ``actual value.''\\
What results do you expect?
\begin{eqnarray*}
{\displaystyle \mbox{\bf (a) } \frac{1}{5} \oplus \frac{5}{7}} = & \qquad \qquad \qquad \qquad \qquad & {\displaystyle \mbox{\bf (b) } \frac{1}{5} \ominus \frac{5}{7}}  =  \\
  & & \\
  & & \\
  & & \\
  & & \\
{\displaystyle \mbox{\bf (c) } \frac{1}{5} \otimes \frac{5}{7}} = & \qquad \qquad \qquad \qquad \qquad & \mbox{\bf (d) } {\displaystyle \frac{1}{5} \oslash \frac{5}{7}}  =  \\
  & & \\
  & & \\
  & & \\
  & & \\
\end{eqnarray*}
\centerline{\bf ANNOUNCEMENTS}
Remember: Class is cancelled on Monday September 7 and Friday September 11 next week.

\end{document}
