\documentclass[12pt]{article}

\usepackage{fullpage,amsmath,amsfonts}


\begin{document}

\title{Foundations of Information Systems}
\author{Winter Semester 2026--27, Exercise 3}
\date{For discussion on Wednesday, November 4, 2026}
\maketitle

\begin{enumerate}


\item Identify values of $x$ for which there is a substantial growth
of relative error when the formula is evaluated in floating point
arithmetic (due to subtraction of almost equal numbers).  Then suggest
an alternate formula that improves accuracy for the problematic range
of $x$.
\begin{enumerate}
\item $\displaystyle \frac{1-(1-x)^3}{x}$
\item $\displaystyle \frac{1 - \sqrt{1-x^2}}x$
\item $\displaystyle \frac{1 - \sec x}{\tan^2 x}$
\end{enumerate}

\emph{Hint:} Recall that $\sec x = (\cos x)^{-1}$; use the well-known
trigonometric identity $\sec^2x = \tan^2x+1$.

\item Does the distributive law hold for floating point computations?

\item Let $a=1.0101 \cdot 2^{5}$ and $b=1.1101 \cdot 2^{3}$ be numbers
in binary floating point with a $5$-bit significant.  Compute
$a\oplus b$ and $a \ominus b$ by hand and state the absolute and the
relative error.

\item Adapt the computation of propagation of floating point error to
the case of floating point division.  You should find that floating
point division has moderate growth of relative error for all numbers.

\item Convert the following single-precision (32-bit IEEE 754) floating point
representation to decimal:
\begin{equation*}
  1 \, 10001010 \, 11000010000000000000000
\end{equation*}

\item Convert the decimal number 500.25 into single-precision (32-bit
IEEE 754) floating point.

\end{enumerate}
\end{document}
