-\begin{frame}
- \frametitle{Floating point calculations \\ go wrong}
- \begin{itemize}
- \item Transforming from document $(x,y)$ $\to$ screen $(X,Y)$
- \item View is at $(v_x,v_y)$ in document, has dimensions $(v_w,v_h)$
- \end{itemize}
- \begin{align}
- X = \frac{x - v_x}{v_w} &,\quad\quad Y = \frac{y - v_y}{v_h}
- \end{align}
- \begin{itemize}
- \item Division by $v_w \approx 10^{-6}$ increases the error due to $x - v_x$
- \item Using \emph{double} precision, render correctly down to $v_w \approx 10^{-37}$
- \end{itemize}