diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-05-15 20:37:42 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-05-15 20:37:42 +0000 |
commit | 3a49cb68ce6b82a26db4e4c9cf04aa98e0dea94c (patch) | |
tree | 16d3eab11b87353ba4c478def52725100e6507c2 /doc | |
parent | c228d9411daa073794b94832acc6f58c82cd74ee (diff) | |
download | mpc-3a49cb68ce6b82a26db4e4c9cf04aa98e0dea94c.tar.gz |
[algorithms.tex] error analysis for mpc_pow_si
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@772 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'doc')
-rw-r--r-- | doc/algorithms.tex | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/algorithms.tex b/doc/algorithms.tex index 66139c6..ab25682 100644 --- a/doc/algorithms.tex +++ b/doc/algorithms.tex @@ -1650,18 +1650,26 @@ $\left( (1 + 2^{-p})^{n-1} - 1 \right) \leq 2 (n-1) 2^{-p}$, because $(1+\varepsilon)^m-1 = \exp(m \log(1+\varepsilon)) - 1 \leq \exp(\varepsilon m) - 1 \leq 2 \varepsilon m$ as long as $\varepsilon m \leq 1$. This gives the simplified bounds -\[ +\begin{equation} \label{eq:powui_re} \left( 2 + 2^{\Exp (\Im \appro x_k) - \Exp (\Re \appro x_k) + 2} \right) (n-1) \Ulp (\Re \appro x_k) -\] +\end{equation} on the real part and of -\[ +\begin{equation} \label{eq:powui_im} \left( 2 + 2^{\Exp (\Re \appro x_k) - \Exp (\Im \appro x_k) + 2} \right) (n-1) \Ulp (\Im \appro x_k) -\] +\end{equation} on the imaginary part. +\subsection {\texttt {mpc\_pow\_si}} +Assume we want to round correctly $z^{-n}$ for $n > 0$. We proceed as follows. +First compute $t = \round(z^n)$ using \texttt {mpc\_pow\_ui}, then +compute $u = \round(1/t)$ using \texttt {mpc\_ui\_div}. +The error analysis is the same as for $z^3$ in \texttt {mpc\_pow\_ui}, +indeed we accumulate two multiplicative rounding errors. +Thus it suffices to replace $n$ by $3$ in (\ref{eq:powui_re}) and +(\ref{eq:powui_im}). \bibliographystyle{acm} \bibliography{algorithms} |