\documentclass[12pt,a4paper]{article}
\usepackage{ngerman}
\usepackage{amsmath}
\renewcommand{\labelenumi}{(\emph{\alph{enumi}})}
\renewcommand{\labelenumii}{\arabic{enumii}.}

\begin{document}
\noindent\textbf{First name:} Christoph\\
\textbf{Last Name:} Oberauer\\
\textbf{Email:} coberau@cosy.sbg.ac.at\\
\textbf{Date:} 15.11.2002\\
\textbf{Homework number:} 1\\
\textbf{Homework Title:} Exercise 1.10


\paragraph{Problem description:\\}
Consider the expression: 
$$\frac{1}{1-x}-\frac{1}{1+x}$$
assuming $x \neq \pm{1}$.
\begin{enumerate}
\item 
For what range of values of $x$ it is difficult to compute this expression accurately to floating point arithmetic?
\item 
Give a rearrangement of the terms such that for the range of $x$ in part $a$, the computation is more accurate in floating point arithmetic.
\end{enumerate}


\paragraph{Problem solution:}
Define $\epsilon$ dependent on machine precession (taking into account the rounding rule), where $fl(1+\epsilon)>1$.
\begin{enumerate}
\item
Try different values for $x$
\item
Rearrange expression
\end{enumerate}


\paragraph{Results:}
\begin{enumerate}
\item
This conditions apply:
\begin{enumerate}
\item
For absolute values of $x$ smaller than $\epsilon$ both operands evaluate to 1 due to cancellation, resulting in zero after subtraction.
\item
For values of $x$ from the intervals $(1-\epsilon,1+\epsilon)$ resp. $(-1-\epsilon,-1+\epsilon)$ division by zero occurs.
\item
For large absolute values of $x$ $fl(x-1)$ and $fl(x+1)$ (resp. $\frac{1}{x-1}$ and $\frac{1}{x+1}$) become almost equal so accuracy will be lost due to cancellation.
\item
Depending on properties of the floating-point system, large absolute values of $x$ can result in underflow in $\frac{1}{1\pm{}x}$.
\end{enumerate}
\item
Transform equation to $\frac{2x}{1-x^2}$:
\begin{enumerate}
\item
$(1-\epsilon,1+\epsilon)$ and $(-1-\epsilon,-1+\epsilon)$ are still critical intervals.
\item
Critical interval for cancellation in denominator around 0 spreads to $(-\sqrt{\epsilon},\sqrt{\epsilon})$.\\
Critical interval for cancellation in enumerator around 0 narrows to $(-\frac{\epsilon}{2},\frac{\epsilon}{2})$.
\item
Maximum absolute value for $x$ limited by $\sqrt{OFL}$ due to $x^2$.
\item
Large values for $x$ not affected by cancellation, but some accuracy lost due to chopping/rounding after multiplication/division.
\end{enumerate}
\end{enumerate}


\paragraph{Discussion and Comments:}
\end{document}