X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fsam.git;a=blobdiff_plain;f=chapters%2FBackground.tex;h=4bedb57032032c6e4c741aaf8f1e58f37c400a9d;hp=700a8b945158dd0c4a6bc919dd0a632d0e481554;hb=cda59ebc98a4f9908717e45a1bf2aa96753f9854;hpb=de27cf41927be7884c3dab087aa41daf27e3395f diff --git a/chapters/Background.tex b/chapters/Background.tex index 700a8b9..4bedb57 100644 --- a/chapters/Background.tex +++ b/chapters/Background.tex @@ -145,6 +145,7 @@ We don't really care about other things (ie: Colour gradients etc) in this repor \item XML (SGML) is the standard language used to represent documents in the DOM \item XML is plain text \item SVG is a standard for a vector graphics language conforming to XML (ie: a DOM format) + \item CSS style sheets represent more complicated styling on objects in the DOM \end{itemize} \subsection{Blurring the Line --- Javascript} @@ -167,35 +168,39 @@ We don't really care about other things (ie: Colour gradients etc) in this repor \end{itemize} \end{itemize} +\subsection{Why do we still use static PDFs} +Despite their limitations, we still use static, boring old PDFs. Particularly in scientific communication. +\begin{itemize} + \item They are portable; you can write an amazing document in Mathematica/Matlab but it + \item Scientific journals would need to adapt to other formats and this is not worth the effort + \item No network connection is required to view a PDF (although DRM might change this?) + \item All rescources are stored in a single file; a website is stored accross many seperate files (call this a ``distributed'' document format?) + \item You can create PDFs easily using desktop processing WYSIWYG editors; WYSIWYG editors for web based documents are worthless due to the more complex content + \item Until Javascript becomes part of the PDF standard, including Javascript in PDF documents will not become widespread + \item Once you complicate a PDF by adding Javascript, it becomes more complicated to create; it is simply easier to use a series of static figures than to embed a shader in your document. Even for people that know WebGL. +\end{itemize} -\section{Precision Limitations of Modern Documents} +\section{Precision in Modern Document Formats} \rephrase{All this is very interesting and provides important context, but it is not actually directly related to the problem of infinite precision which we are going to try and solve}. -\subsection{Limitations Imposed By Standards} -\begin{itemize} - \item Implementations of PostScript and PDF must by definition restrict themselves to IEEE binary32 ``single precision'' floating point number representations in order to conform to the standards\cite{plrm, pdfref17}. - \item Implementations of SVG are by definition required to use IEEE binary32 as a {\bf minimum}. ``High Quality'' SVG viewers are required to use at least IEEE binary64.\cite{svg2011-1.1} -\end{itemize} -\subsection{Limitations Imposed By Graphics APIs and/or GPUs} - -It's not really the standard's fault (although they could specify double); they specify IEEE because underlying hardware must use IEEE. - \begin{itemize} - \item Internal representations are GPU dependent\cite{hillesland2004paranoia} - \item OpenGL standards specify: binary16, binary32, binary64 - \item OpenVG aims to become a standard API for SVG viewers but it uses binary32 and may be {\bf worse} internally\cite{rice2008openvg} + \item Implementations of PostScript and PDF must by definition restrict themselves to IEEE binary32 ``single precision''\footnote{The original IEEE-754 defined single, double and extended precisions; in the revision these were renamed to binary32, binary64 and binary128 to explicitly state the base and number of bits} + floating point number representations in order to conform to the standards\cite{plrm, pdfref17}. + \item Implementations of SVG are by definition required to use IEEE binary32 as a {\bf minimum}. ``High Quality'' SVG viewers are required to use at least IEEE binary64.\cite{svg2011-1.1} + \item Numerical computation packages such as Mathematica and Maple use arbitrary precision floats + \begin{itemize} + \item Mathematica is not open source which is an issue when publishing scientific research (because people who do not fork out money for Mathematica cannot verify results) + \item What about Maple? \cite{HFP} and \cite{fousse2007mpfr} both mention it being buggy. + \item Octave and Matlab use fixed precision doubles + \end{itemize} \end{itemize} -\subsection{Limitations Imposed By CPU} - -Even if we don't use the GPU, CPU's are restricted in their representation of floating point numbers by the IEEE standard. - -\rephrase{AND THUS WE FINALLY GET TO THE POINT} +The use of IEEE binary32 floats in the PostScript and PDF standards is not surprising if we consider that these documents are oriented towards representing static pages. They don't actually need higher precision to do this; 32 bits is more than sufficient for A4 paper. \section{Representation of Numbers} @@ -225,6 +230,28 @@ The most a result can be rounded in conversion to a floating point number is the \rephrase{Even though that paper that claims double is the best you will ever need because the error can be as much as the size of a bacterium relative to the distance to the moon}\cite{} \rephrase{there are many cases where increased number of bits will not save you}.\cite{HFP} +\subsection{Limitations Imposed By CPU} + +CPU's are restricted in their representation of floating point numbers by the IEEE standard. + + + +\subsection{Limitations Imposed By Graphics APIs and/or GPUs} + +Traditionally algorithms for drawing vector graphics are performed on the CPU; the image is rasterised and then sent to the GPU for rendering\cite{}. Recently there has been a great deal of literature relating to implementation of algorithms such as bezier curve rendering\cite{} or shading\cite{} on the GPU. As it seems the trend is to move towards GPU + +\begin{itemize} + \item Internal representations are GPU dependent and may not match IEEE\cite{hillesland2004paranoia} + \item OpenGL standards specify: binary16, binary32, binary64 + \item OpenVG aims to become a standard API for SVG viewers but the API only uses binary32 and hardware implementations may use less than this internally\cite{rice2008openvg} + \item It seems that IEEE has not been entirely successful; although all modern CPUs and GPUs are able to read and write IEEE floating point types, many do not conform to the IEEE standard in how they represent floating point numbers internally. +\end{itemize} + + + +\rephrase{AND THUS WE FINALLY GET TO THE POINT} + + \subsection{Examples of Precision Related Errors in Floating Point Arithmetic} \subsection{Relate This to the Sorts of Maths Done By Document Formats}