summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-06-27 12:05:57 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2012-06-27 12:05:57 +0000
commit36533102836d6b07a6531a7ddc6d7ebf3622d163 (patch)
treeaa41c317b6d6b685a302f3a17a6f6076dface5d3 /doc
parent890ca61e61e9c88d5d09b13a9520aca8b877aabe (diff)
downloadmpc-36533102836d6b07a6531a7ddc6d7ebf3622d163.tar.gz
algorithms.tex: propagation error of real sin and cos
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1186 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'doc')
-rw-r--r--doc/algorithms.tex38
1 files changed, 37 insertions, 1 deletions
diff --git a/doc/algorithms.tex b/doc/algorithms.tex
index 6ca7454..cee55af 100644
--- a/doc/algorithms.tex
+++ b/doc/algorithms.tex
@@ -46,7 +46,7 @@
\title {MPC: Algorithms and Error Analysis}
\author {Andreas Enge \and Philippe Th\'eveny \and Paul Zimmermann}
-\date {Draft; June 16, 2010}
+\date {Draft; June 27, 2012}
\begin {document}
\maketitle
@@ -424,6 +424,42 @@ Then by \cite[\S1.7]{MPFRAlgorithms},
\end {equation}
+\subsubsection {Cosine and sine}
+\label {sssec:proprealcossin}
+
+Let
+\[
+\appro x = \cos {\appro {x_1}}.
+\]
+Using the addition formula for $\cos$,
+\[
+\cos (a + b) = \cos (a) \cos (b) - \sin (a) \sin (b),
+\]
+we obtain
+\begin {eqnarray*}
+\error (\appro x)
+& \leq & |\cos (x)| (1 - \cos (\error (\appro {x_1})))
++ |\sin (x) \sin (\error (\appro {x_1}))| \\
+& \leq & 2 \error (\appro {x_1})
+\end {eqnarray*}
+since $|\sin (\delta)|$, $1 - \cos (\delta) \leq \delta$
+(one even has $1 - \cos (\delta) \leq \frac {1}{2} \delta^2$,
+but this does not fundamentally improve the error bound).
+
+Taking the exponents into account, one obtains
+\begin {equation}
+\label {eq:proprealcos}
+\error (\appro x)
+\leq
+2 k \, 2^{\Exp (\appro {x_1}) - \Exp (\appro x)}
+\, 2^{\Exp (\appro x) - p}.
+\end {equation}
+
+For the sine function, a completely analogous argument shows that
+\eqref {eq:proprealcos} still holds.
+
+
+
\subsection {Complex functions}