diff options
author | Paul Zimmermann <Paul.Zimmermann@inria.fr> | 2020-02-18 15:43:42 +0100 |
---|---|---|
committer | Paul Zimmermann <Paul.Zimmermann@inria.fr> | 2020-02-18 15:43:42 +0100 |
commit | 1d0f809d20d1fe5a2704bd15307a0be9fa1ef9b0 (patch) | |
tree | 501f245a9a0584e6b720580a304a9b15ecc523f7 | |
parent | ae98bec986fbec11d1bafeb173eb7d72146189e4 (diff) | |
download | mpc-git-1d0f809d20d1fe5a2704bd15307a0be9fa1ef9b0.tar.gz |
stopping loop at K-1 gives simpler formula
-rw-r--r-- | doc/algorithms.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/algorithms.tex b/doc/algorithms.tex index ac17093..e77089f 100644 --- a/doc/algorithms.tex +++ b/doc/algorithms.tex @@ -1203,7 +1203,7 @@ we can use the following algorithm, with working precision $p$: w = o(z*z) t = o(z) s = o(z) - for k from 1 to K do: + for k from 1 to K-1 do: u = o(t * w) v = o(u * ((2k-1) * (2k-1))) t = o(v / ((2*k) * (2*k+1)) @@ -1281,10 +1281,10 @@ and it follows easily $\varepsilon_k \leq \frac{5}{3} \cdot 2^{-e-p}$. Now the absolute error on $s$ at the end of the for loop --- not taking into account the mathematical error when truncating the Taylor series --- is bounded for $e=1$ by: -\[ {\rm err}(s) \leq \sum_{k=0}^K (5k+1) 2^{-1-p} = \frac{(5K+2)(K+1)}{2} 2^{-1-p}, \] +\[ {\rm err}(s) \leq \sum_{k=0}^{K-1} (5k+1) 2^{-1-p} = \frac{(5K-3)K}{2} 2^{-1-p}, \] and for $e \geq 2$: -\[ {\rm err}(s) \leq \sum_{k=0}^K \frac{5}{3} \cdot 2^{-e-p} = - \frac{5}{3} (K+1) 2^{-e-p}. \] +\[ {\rm err}(s) \leq \sum_{k=0}^{K-1} \frac{5}{3} \cdot 2^{-e-p} = + \frac{5}{3} K 2^{-e-p}. \] \subsection {\texttt {mpc\_pow}} |