It resembles a first approximation to a rough draft...
[ipdf/sam.git] / presentation / presentation.tex
index 9ad4c78..7d5494b 100644 (file)
@@ -38,7 +38,7 @@
 {Supervisors: Tim French, Rowan Davies}
 
 \date[CSS 2009]{\today} % change the actual date
- \titlegraphic{\includegraphics[width=3cm]{./Logos/WAMSI.png}}
%\titlegraphic{\includegraphics[width=3cm]{./Logos/WAMSI.png}}
 
 %% Optional stuff------------------------------------------------------------------
 
 \frametitle{Visualisation of Floats}
 \begin{itemize}
        \item \small{With total length of $m$ and $E$ limited to $7$ bits (1 sign bit)}
-       \item Showing positive numbers only
+       \item Operations are inexact (in general)
 \end{itemize}
 \centering
 \includegraphics[width=0.8\textwidth]{../figures/floats.pdf}
-       
 \end{frame}
 
-\begin{frame}
-\frametitle{Floating point calculations \\ go wrong}
-\begin{itemize}
-       \item At scale of only $1\times 10^{-6}$, the fox is very sick
-\end{itemize}
-\centering
-       \includegraphics[width=0.5\textwidth]{../figures/fox-vector_highzoom1.png}
-       \begin{itemize}
-               \item Plank Length: $1.61 \times 10^{-35}$ metres $ > 3\times10^{-38}$
-               \item Size of Universe: $4.3 \times 10^{26}$ metres $ << 3 \times10^{38}$
-               \item Why isn't this good enough for $1\times 10^{-6}$
-       \end{itemize}
-\end{frame}
 
-\section{Implementing a Basic SVG Viewer}
 \begin{frame}
 \frametitle{Structure of Vector Graphics}
 \begin{itemize}
 \includegraphics[width=0.5\textwidth]{../figures/fox-vector_face_with_bezbounds.png}
 \end{frame}
 
+
+\begin{frame}
+\frametitle{Floating point calculations \\ go wrong}
+\begin{itemize}
+       \item Scaled to $~1\times 10^{-6}$, the fox is very sick
+\end{itemize}
+\centering
+       \includegraphics[width=0.5\textwidth]{../figures/fox-vector_highzoom1.png}
+
+\end{frame}
+
+
+\begin{frame}
+       \frametitle{Arbitrary Precision Rationals}      
+       \begin{align}
+               Q &= \frac{N}{D} 
+       \end{align}                     
+       \begin{itemize}
+               \item $N$ and $D$ are arbitrary precision integers
+       \end{itemize}
+       \begin{align}
+               N &= \sum_{i=0}^{S} d_i \beta^{i}
+       \end{align}     
+       \begin{itemize}
+               \item $d_i$ are fixed size integers, $\beta = 2^{64}$
+               \item Size $S$ grows as needed
+               \item Operations are always exact
+               \item Implemented by GNU Multiple Precision Library
+       \end{itemize}
+\end{frame}
+
+\begin{frame}
+       \frametitle{Replace floats with rationals?}
+       \begin{itemize}
+               \item Rationals are \emph{slow}
+               \item Screen coordinates always in range $0 \to 1$
+               \item Introduce intermediate coordinate system
+               \begin{itemize}
+                       \item Many B\'{e}ziers contained in a Path
+                       \item Use Rationals for bounds of the Path
+                       \item Use floats to transform B\'{e}zier coordinates
+               \end{itemize}
+       \end{itemize}
+\end{frame}
+
 \section{Live Demo}
 \begin{frame}
 \frametitle{Live Demo}
 \end{itemize}
 \end{frame}
 \section{References}
-
+\begin{frame}
+       \frametitle{References \& More information}
+       \begin{itemize}
+               \item Work on SVG viewer collaborative with David Gow
+               \begin{itemize}
+                       \item See David Gow's presentation about Quadtrees
+               \end{itemize}
+               \item Muller et al, \emph{Handbook of Floating Point Arithmetic}, 
+               \item Hearn, Baker \emph{Computer Graphics}
+               \item Kahan et al, \emph{IEEE-754} (1985 and 2008 revision)
+               \item Dahlst{\'o}m et al, \emph{SVG WC3 Recommendation 2011}
+               \item Grunland et al, \emph{GNU Multiple Precision Manual 6.0.0a}
+               \item Kahan's website \url{http://http.cs.berkeley.edu/~wkahan}
+       \end{itemize}
+\end{frame}
 \section{Questions}
 
 \begin{frame}
 
 \begin{frame}
 \frametitle{Q: Arbitrary precision floats?}
+\begin{align}
+       X &= m \times 2^{E}
+\end{align}
 \begin{itemize}
-       \item We support them as well!
-       \item Rationals are more convenient:
+       \item $m$ and $E$ are of arbitrary size
+       \item Implemented by MPFR or GMP
+       \item Difficulties:
        \begin{itemize}
-               \item Need to manually set precision
+               \item Need to manually set precision (size) of $m$
                \item Some operations require infinite precision:
                \begin{align}
                        \frac{1}{3} &= 0.3333333333333333333333 \text{ ... } \times 10^0
                \end{align}
                \item How do you choose when to increase precision?
        \end{itemize}
-       \item Could be future work
 \end{itemize}
 \end{frame}
 
 
+\begin{frame}
+       \frametitle{Floating Point calculations \\ go wrong}
+       \begin{itemize}
+               \item Plank Length: $1.61 \times 10^{-35}$ metres $ > 3\times10^{-38}$
+               \item Size of Universe: $4.3 \times 10^{26}$ metres $ << 3 \times10^{38}$
+               \item Why isn't this good enough for $1\times 10^{-6}$
+       \end{itemize}
+\end{frame}
+
+\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}
+\end{frame}
+
+
 \end{document}

UCC git Repository :: git.ucc.asn.au