diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-06-09 08:07:29 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-06-09 08:07:29 +0000 |
commit | 20ec946bf7acd8f5ed5c3633d207ca657a7381b0 (patch) | |
tree | 13993c9ecabac1e10a071379d0f117105a4d813f /algorithms.tex | |
parent | 509103d329cc724781dc78720c15138fe554362b (diff) | |
download | mpfr-20ec946bf7acd8f5ed5c3633d207ca657a7381b0.tar.gz |
added section on Notations
fixed notations for roundings
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4089 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'algorithms.tex')
-rw-r--r-- | algorithms.tex | 182 |
1 files changed, 95 insertions, 87 deletions
diff --git a/algorithms.tex b/algorithms.tex index 113406c16..400795477 100644 --- a/algorithms.tex +++ b/algorithms.tex @@ -43,6 +43,14 @@ Algorithms and Proofs} \tableofcontents +\section{Notations} + +In the whole document, $\N()$ denotes rounding to nearest, +$\Z()$ rounding towards zero, +$\pinf()$ rounding towards plus infinity, +$\minf()$ rounding towards minus infinity, +and $\circ()$ any of those four rounding modes. + \section{Error calculus} Let $n$ --- the working precision --- @@ -120,8 +128,8 @@ Easy: if $a = m_a \cdot 2^{e_a}$, then $2^k a = m_a \cdot 2^{e_a+k}$. \end{proof} \begin{Rule} \label{R6} -Let $x > 0$, $o(\cdot)$ be any rounding, and $u := o(x)$, then $\frac{1}{2} u - < x < 2 u$. +Let $x > 0$, $\circ(\cdot)$ be any rounding, and $u := o(x)$, +then $\frac{1}{2} u < x < 2 u$. \end{Rule} \begin{proof} Assume $x \geq 2 u$, then $2u$ is another representable number which is closer @@ -138,18 +146,18 @@ and the right one from $|a| \ulp(1) \geq \frac{1}{2} 2^{e_a} 2^{1-n} =\ulp(a)$. \end{proof} \begin{Rule} \label{R8} -For any $x \neq 0$ and any rounding mode $o(\cdot)$, -we have $\ulp(x) \leq \ulp(o(x))$, and equality holds when rounding towards +For any $x \neq 0$ and any rounding mode $\circ(\cdot)$, +we have $\ulp(x) \leq \ulp(\circ(x))$, and equality holds when rounding towards zero, towards $-\infty$ for $x>0$, or towards $+\infty$ for $x<0$. \end{Rule} \begin{proof} Without loss of generality, assume $x > 0$. Let $x = m \cdot 2^e$ with $\frac{1}{2} \leq m < 1$. -As $\frac{1}{2} 2^{e_x}$ is a machine number, necessarily $o(x) \geq -\frac{1}{2} 2^{e_x}$, thus by Rule~\ref{R2}, then $\ulp(o(x)) \geq +As $\frac{1}{2} 2^{e_x}$ is a machine number, necessarily $\circ(x) \geq +\frac{1}{2} 2^{e_x}$, thus by Rule~\ref{R2}, then $\ulp(\circ(x)) \geq 2^{e_x - n} = \ulp(x)$. -If we round towards zero, then $o(x) \leq x$ and by Rule~\ref{R2} again, -$\ulp(o(x)) \leq \ulp(x)$. +If we round towards zero, then $\circ(x) \leq x$ and by Rule~\ref{R2} again, +$\ulp(\circ(x)) \leq \ulp(x)$. \end{proof} \begin{Rule} \label{R9} @@ -159,11 +167,11 @@ $\ulp(o(x)) \leq \ulp(x)$. \end{eqnarray} \begin{eqnarray}\nonumber -&&\n{For}\;\; u=o(x),\;\; u.c_u^- \leq x \leq u.c_u^+\\\nonumber +&&\n{For}\;\; u=\circ(x),\;\; u.c_u^- \leq x \leq u.c_u^+\\\nonumber &&\n{if}\;\; u=\pinf(x),\n{ then } c_u^+=1\\\nonumber &&\n{if}\;\; u=\minf(x),\n{ then } c_u^-=1\\\nonumber -&&\n{if}\;\; \n{for $x<0$ and } u=Z(x),\n{ then } c_u^+=1 \\\nonumber -&&\n{if}\;\; \n{for $x>0$ and } u=Z(x),\n{ then } c_u^-=1 \\\nonumber +&&\n{if}\;\; \n{for $x<0$ and } u=\Z(x),\n{ then } c_u^+=1 \\\nonumber +&&\n{if}\;\; \n{for $x>0$ and } u=\Z(x),\n{ then } c_u^-=1 \\\nonumber &&\n{else}\;\; c_u^{-}=1-2^{1-p} \n{ and } c_u^{+}=1+2^{1-p} \end{eqnarray} \end{Rule} @@ -229,7 +237,7 @@ error(w)& \leq &c_w \ulp(w) + k_u \ulp(u) + k_v \ulp(v) \\\nonumber error(w)& \leq&(c_w + k_u + k_v) \, \ulp(w) \end{eqnarray} \begin{eqnarray}\nonumber -\textnormal{Note:}&&\textnormal{If}\;\; w=N(u+v) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1\\\nonumber +\textnormal{Note:}&&\textnormal{If}\;\; w=\N(u+v) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1\\\nonumber \end{eqnarray} \subsection{Generic error of multiplication}\label{generic:mul} @@ -239,7 +247,7 @@ We want to compute the generic error of the multiplication. We assume here $u, v > 0$. \begin{eqnarray}\nonumber -w&=&o(u.v) \\\nonumber +w&=&\circ(u.v) \\\nonumber \textnormal{Note:}&& error(u) \leq k_u \, \ulp(u), \;\; error(v) \leq k_v \, \ulp(v) \end{eqnarray} \begin{eqnarray}\nonumber @@ -252,7 +260,7 @@ error(w)& = &|w - x.y| \\\nonumber & \leq & [ c_w + (1+c_u^+) k_v + (1+c_v^+) k_u ] \ulp(w)\U{R8}\\\nonumber \end{eqnarray} \begin{eqnarray}\nonumber -\textnormal{Note:}&&\textnormal{If}\;\; w=N(u+v) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1 +\textnormal{Note:}&&\textnormal{If}\;\; w=\N(u+v) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1 \end{eqnarray} \subsection{Generic error of inverse}\label{generic:inv} @@ -261,7 +269,7 @@ We want to compute the generic error of the inverse. We assume $u > 0$. \begin{eqnarray}\nonumber -w&=&o(\frac{1}{u}) \\\nonumber +w&=&\circ(\frac{1}{u}) \\\nonumber \textnormal{Note:}&& error(u) \leq k_u \, \ulp(u) \end{eqnarray} \begin{eqnarray}\nonumber @@ -281,7 +289,7 @@ error(w)& \leq & c_w \ulp(w) + c_u\frac{k_u}{u^2} \ulp(u)\\\nonumber & \leq & [c_w + 2.c_u.k_u].\ulp(w) \U{R8} \end{eqnarray} \begin{eqnarray}\nonumber -\textnormal{Note:}&&\textnormal{If}\;\; w=N(\frac{1}{u}) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1\\\nonumber\end{eqnarray} +\textnormal{Note:}&&\textnormal{If}\;\; w=\N(\frac{1}{u}) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1\\\nonumber\end{eqnarray} \subsection{Generic error of division}\label{generic:div} @@ -289,7 +297,7 @@ error(w)& \leq & c_w \ulp(w) + c_u\frac{k_u}{u^2} \ulp(u)\\\nonumber We want to compute the generic error of the division. Without loss of generality, we assume all variables are positive. \begin{eqnarray}\nonumber -w&=&o(\frac{u}{v}) \\\nonumber +w&=&\circ(\frac{u}{v}) \\\nonumber \textnormal{Note:}&& error(u) \leq k_u \, \ulp(u), \;\; error(v) \leq k_v \, \ulp(v) \end{eqnarray} \begin{eqnarray}\nonumber @@ -316,7 +324,7 @@ error(w)& \leq & c_w \ulp(w) + 2.k_u \ulp(w)+ c_u.c_v.\frac{k_v u}{vv} \ulp(v)\ & \leq & [c_w + 2.k_u+ 2.c_u.c_v.k_v].\ulp(w) \U{R8} \end{eqnarray} \begin{eqnarray}\nonumber -\textnormal{Note:}&&\textnormal{If}\;\; w=N(\frac{u}{v}) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1 +\textnormal{Note:}&&\textnormal{If}\;\; w=\N(\frac{u}{v}) \;\;\textnormal{Then}\;\; c_w =\frac{1}{2} \;\;\textnormal{else}\;\; c_w =1 \end{eqnarray} Note that we can obtain a slightly different result by writing $uy-vx = (uy - uv) + (uv - vx)$ instead of $(uy-xy)+(xy-vx)$. @@ -335,7 +343,7 @@ this is bounded by $w (|\theta_u|+|\theta_v|)$. We want to compute the generic error of the square root of a floating-point number $u$, itself an approximation to a real $x$, with $|u - x| \leq k_u \ulp(u)$. -If $v = o(\sqrt{u})$, then: +If $v = \circ(\sqrt{u})$, then: \begin{eqnarray}\nonumber error(v) := |v - \sqrt{x}| & \leq &|v - \sqrt{u}| +|\sqrt{u} - \sqrt{x}| \\\nonumber @@ -362,7 +370,7 @@ $|v-\sqrt{x}| \leq (c_v + k_u) \ulp(v)$. We want to compute the generic error of the exponential. \begin{eqnarray}\nonumber -v&=&o(e^{u}) \\\nonumber +v&=&\circ(e^{u}) \\\nonumber \textnormal{Note:}&& error(u) \leq k_u \, \ulp(u)\\\nonumber \end{eqnarray} \begin{eqnarray}\nonumber @@ -392,7 +400,7 @@ error(v)& \leq & c_v \ulp(v) + c_u^* e^u k_u \ulp(u) \\\nonumber We want to compute the generic error of the logarithm. \begin{eqnarray}\nonumber -v&=&o(\log{u}) \\\nonumber +v&=&\circ(\log{u}) \\\nonumber \textnormal{Note:}&& error(u) \leq k_u \, \ulp(u)\\\nonumber \end{eqnarray} \begin{eqnarray}\nonumber @@ -1068,13 +1076,13 @@ cosine as : \[\cosh x = \frac{1}{2} \left( e^{x} + \frac{1}{e^x} \right).\] -The algorithm used for the calculation of the hyperbolic cosine is as follows\footnote{$o()$ represent the rounding error and $error(u)$ the +The algorithm used for the calculation of the hyperbolic cosine is as follows\footnote{$\circ()$ represent the rounding error and $error(u)$ the error associate with the calculation of $u$}: \begin{eqnarray}\nonumber -u&\leftarrow&o(e^x)\\\label{coshalgo1} -v&\leftarrow&o({u}^{-1})\\\label{coshalgo2} -w&\leftarrow&o(u+v)\\\label{coshalgo3} +u&\leftarrow&\circ(e^x)\\\label{coshalgo1} +v&\leftarrow&\circ({u}^{-1})\\\label{coshalgo2} +w&\leftarrow&\circ(u+v)\\\label{coshalgo3} s&\leftarrow&\frac{1}{2} w\\\label{coshalgo4} \end{eqnarray} @@ -1095,7 +1103,7 @@ with $x \geq 0$. We can deduce $e^x \geq 1$ and $0 \leq e^{-x} \leq ${\textnormal{error}}(u)$ -$u \leftarrow o(e^x)$\\ +$u \leftarrow \circ(e^x)$\\ $-\infty \;\; (\bullet)$ \end{minipage} & @@ -1113,7 +1121,7 @@ $-\infty \;\; (\bullet)$ ${\textnormal{error}}(v)$ -$v \leftarrow o({u}^{-1}) $\\ +$v \leftarrow \circ({u}^{-1}) $\\ $+\infty \;\; (\bullet\bullet)$ \end{minipage} & \begin{minipage}{7.5cm} @@ -1160,7 +1168,7 @@ $v$ to $+\infty \;\; (\bullet)$\\ ${\textnormal{error}}(w)$ -$w \leftarrow o(u+v) $ +$w \leftarrow \circ(u+v) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -1194,7 +1202,7 @@ then $\ulp(u) \leq \ulp(w)$ \begin{minipage}{2.5cm} ${\textnormal{error}}(s)$ -$s \leftarrow o(\frac{w}{2}) $ +$s \leftarrow \circ(\frac{w}{2}) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -1260,13 +1268,13 @@ sine as : \[\sinh x = \frac{1}{2} \left( e^{x} - \frac{1}{e^x} \right).\] -The algorithm used for the calculation of the hyperbolic sine is as follows\footnote{$o()$ represent the rounding error and $error(u)$ the +The algorithm used for the calculation of the hyperbolic sine is as follows\footnote{$\circ()$ represent the rounding error and $error(u)$ the error associate with the calculation of $u$}: \begin{eqnarray}\nonumber -u&\leftarrow&o(e^x)\\\nonumber -v&\leftarrow&o({u}^{-1})\\\nonumber -w&\leftarrow&o(u-v)\\\nonumber +u&\leftarrow&\circ(e^x)\\\nonumber +v&\leftarrow&\circ({u}^{-1})\\\nonumber +w&\leftarrow&\circ(u-v)\\\nonumber s&\leftarrow&\frac{1}{2} w \end{eqnarray} @@ -1350,7 +1358,7 @@ it is possible with $v=\pinf(u^{-1})$ $(\bullet\bullet)$ ${\textnormal{error}}(w)$ -$w \leftarrow o(u+v) $ +$w \leftarrow \circ(u+v) $ \end{minipage} & \begin{minipage}{7.8cm} @@ -1382,7 +1390,7 @@ see subsection \ref{generic:sous} \begin{minipage}{2.5cm} ${\textnormal{error}}(s)$ -$s \leftarrow o(\frac{w}{2}) $ +$s \leftarrow \circ(\frac{w}{2}) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -1425,11 +1433,11 @@ The {\tt mpfr\_asinh} ($\n{acosh}{x}$) function implements the inverse hyperboli The algorithm used for the calculation of the inverse hyperbolic sine is as follows \begin{eqnarray}\nonumber -s&\leftarrow&o(x^2)\\\nonumber -t&\leftarrow&o(s+1)\\\nonumber -u&\leftarrow&o(\sqrt{t})\\\nonumber -v&\leftarrow&o(u+x)\\\nonumber -w&\leftarrow&o(\log v) +s&\leftarrow&\circ(x^2)\\\nonumber +t&\leftarrow&\circ(s+1)\\\nonumber +u&\leftarrow&\circ(\sqrt{t})\\\nonumber +v&\leftarrow&\circ(u+x)\\\nonumber +w&\leftarrow&\circ(\log v) \end{eqnarray} @@ -1445,7 +1453,7 @@ with $x \geq 0$. ${\textnormal{error}}(s)$ -$s \leftarrow o(x^2) $ +$s \leftarrow \circ(x^2) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -1490,7 +1498,7 @@ see subsection \ref{generic:sous} ${\textnormal{error}}(u)$ -$u \leftarrow o(\sqrt{t}) $ +$u \leftarrow \circ(\sqrt{t}) $ \end{minipage} & @@ -1516,7 +1524,7 @@ with ($\bullet$) ${\textnormal{error}}(v)$ -$v \leftarrow o(u+x) $ +$v \leftarrow \circ(u+x) $ \end{minipage} & @@ -1540,7 +1548,7 @@ see subsection \ref{generic:sous} ${\textnormal{error}}(w)$ -$w \leftarrow o(\log v) $ +$w \leftarrow \circ(\log v) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -1629,11 +1637,11 @@ The {\tt mpfr\_atanh} ($\n{acosh}{x}$) function implements the inverse hyperboli The algorithm used for the calculation of the inverse hyperbolic tangent is as follows \begin{eqnarray}\nonumber -s&\leftarrow&o(1+x)\\\nonumber -t&\leftarrow&o(1-x)\\\nonumber -u&\leftarrow&o(\frac{s}{t})\\\nonumber -v&\leftarrow&o(\log u)\\\nonumber -w&\leftarrow&o(\frac{1}{2} v) +s&\leftarrow&\circ(1+x)\\\nonumber +t&\leftarrow&\circ(1-x)\\\nonumber +u&\leftarrow&\circ(\frac{s}{t})\\\nonumber +v&\leftarrow&\circ(\log u)\\\nonumber +w&\leftarrow&\circ(\frac{1}{2} v) \end{eqnarray} @@ -1696,7 +1704,7 @@ see subsection \ref{generic:sous} ${\textnormal{error}}(u)$ -$u \leftarrow o(\frac{s}{t}) $ +$u \leftarrow \circ(\frac{s}{t}) $ \end{minipage} & @@ -1724,7 +1732,7 @@ with ($\bullet$) and ($\bullet\bullet$) ${\textnormal{error}}(v)$ -$v \leftarrow o(\log(u)) $ +$v \leftarrow \circ(\log(u)) $ \end{minipage} & @@ -1751,7 +1759,7 @@ see subsection \ref{generic:log} ${\textnormal{error}}(w)$ -$w \leftarrow o(\frac{1}{2} v) $ +$w \leftarrow \circ(\frac{1}{2} v) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2097,16 +2105,16 @@ The \texttt{mpfr\_hypot} function implements the euclidean distance function: \] The algorithm used is as follows, where all roundings are done towards zero: \begin{eqnarray}\nonumber -u&\leftarrow&o(x^2)\\\nonumber -v&\leftarrow&o(y^2)\\\nonumber -w&\leftarrow&o(u+v)\\\nonumber -s&\leftarrow&o(\sqrt{w}) +u&\leftarrow&\circ(x^2)\\\nonumber +v&\leftarrow&\circ(y^2)\\\nonumber +w&\leftarrow&\circ(u+v)\\\nonumber +s&\leftarrow&\circ(\sqrt{w}) \end{eqnarray} Since the inputs $x$ and $y$ are exact, we have $|u-x^2| \leq \ulp(u)$ and $|v-y^2| \leq \ulp(v)$; then $|w-(x^2+y^2)| \leq \ulp(w) + |u-x^2| + |v-y^2| \leq 3 \ulp(w)$ since $w$ is greater or equal to $u$ and $v$. -For the last step $s \leftarrow o(\sqrt{w})$, we use the last formula +For the last step $s \leftarrow \circ(\sqrt{w})$, we use the last formula from~\textsection\ref{generic:sqrt}, which gives $|s-\sqrt{x^2+y^2}| \leq 4 \ulp(s)$. @@ -2121,8 +2129,8 @@ The {\tt mpfr\_fma} ($\n{fma}(x,y,z)$) function implements the floating multiply The algorithm used for this calculation is as follows: \begin{eqnarray}\nonumber -u&\leftarrow&o(x \times y)\\\nonumber -v&\leftarrow&o(z + u)\\\nonumber +u&\leftarrow&\circ(x \times y)\\\nonumber +v&\leftarrow&\circ(z + u)\\\nonumber \end{eqnarray} Now, we have to bound the rounding error for each step of this @@ -2139,7 +2147,7 @@ algorithm. ${\textnormal{error}}(u)$ -$u \leftarrow o(x \times y)$ +$u \leftarrow \circ(x \times y)$ \end{minipage} & \begin{minipage}{7.5cm} @@ -2156,7 +2164,7 @@ $u \leftarrow o(x \times y)$ ${\textnormal{error}}(v)$ -$v \leftarrow o(z+u) $ +$v \leftarrow \circ(z+u) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2195,8 +2203,8 @@ The {\tt mpfr\_expm1} ($\n{expm1}(x)$) function implements the expm1 function a The algorithm used for this calculation is as follows: \begin{eqnarray}\nonumber -u&\leftarrow&o(e^x)\\\nonumber -v&\leftarrow&o(u-1)\\\nonumber +u&\leftarrow&\circ(e^x)\\\nonumber +v&\leftarrow&\circ(u-1)\\\nonumber \end{eqnarray} Now, we have to bound the rounding error for each step of this @@ -2212,7 +2220,7 @@ algorithm. ${\textnormal{error}}(u)$ -$u \leftarrow o(e^x)$ +$u \leftarrow \circ(e^x)$ \end{minipage} & \begin{minipage}{7.5cm} @@ -2229,7 +2237,7 @@ $u \leftarrow o(e^x)$ ${\textnormal{error}}(v)$ -$v \leftarrow o(u-1) $ +$v \leftarrow \circ(u-1) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2267,9 +2275,9 @@ The {\tt mpfr\_log1p} ($\n{log1p}(x)$) function implements the log1p function a The algorithm used for this calculation is as follows: \begin{eqnarray}\nonumber -u&\leftarrow&o(x)\\\nonumber -v&\leftarrow&o(1+u)\\\nonumber -w&\leftarrow&o(\log(v))\\\nonumber +u&\leftarrow&\circ(x)\\\nonumber +v&\leftarrow&\circ(1+u)\\\nonumber +w&\leftarrow&\circ(\log(v))\\\nonumber \end{eqnarray} Now, we have to bound the rounding error for each step of this @@ -2284,7 +2292,7 @@ algorithm. ${\textnormal{error}}(u)$ -$u \leftarrow o(x)$ +$u \leftarrow \circ(x)$ \end{minipage} & \begin{minipage}{7.5cm} @@ -2301,7 +2309,7 @@ $u \leftarrow o(x)$ ${\textnormal{error}}(v)$ -$v \leftarrow o(1+u) $ +$v \leftarrow \circ(1+u) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2320,7 +2328,7 @@ see subsection \ref{generic:sous} ${\textnormal{error}}(w)$ -$w \leftarrow o(\log(v)) $ +$w \leftarrow \circ(\log(v)) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2363,9 +2371,9 @@ The algorithm used for this calculation is the same for $\n{log2}$ or $\n{log10}$ and is described as follows for $t=2 \n{ or } 10$: \begin{eqnarray}\nonumber -u&\leftarrow&o(\log(x))\\\nonumber -v&\leftarrow&o(\log(t))\\\nonumber -w&\leftarrow&o(\frac{u}{v})\\\nonumber +u&\leftarrow&\circ(\log(x))\\\nonumber +v&\leftarrow&\circ(\log(t))\\\nonumber +w&\leftarrow&\circ(\frac{u}{v})\\\nonumber \end{eqnarray} Now, we have to bound the rounding error for each step of this @@ -2413,7 +2421,7 @@ $(\bullet\bullet)$ ${\textnormal{error}}(w)$ -$w \leftarrow o(\frac{u}{v}) $ +$w \leftarrow \circ(\frac{u}{v}) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2451,9 +2459,9 @@ The {\tt mpfr\_pow} function implements the power function as: The algorithm used for this calculation is as follows: \begin{eqnarray}\nonumber -u&\leftarrow&o(\log(x))\\\nonumber -v&\leftarrow&o(y u)\\\nonumber -w&\leftarrow&o(e^v)\\\nonumber +u&\leftarrow&\circ(\log(x))\\\nonumber +v&\leftarrow&\circ(y u)\\\nonumber +w&\leftarrow&\circ(e^v)\\\nonumber \end{eqnarray} Now, we have to bound the rounding error for each step of this @@ -2468,7 +2476,7 @@ algorithm with $x \geq 0$ and $y$ is a floating number. ${\textnormal{error}}(u)$ -$u \leftarrow o(\log(x))$ +$u \leftarrow \circ(\log(x))$ \end{minipage} & \begin{minipage}{7.5cm} @@ -2514,7 +2522,7 @@ with \U{R8} ${\textnormal{error}}(w)$ -$w \leftarrow o(e^v) $ +$w \leftarrow \circ(e^v) $ \end{minipage} & \begin{minipage}{7.5cm} @@ -2976,13 +2984,13 @@ is an exponent loss in the final subtraction $r = \circ(v_{n+1}-w)$. \begin{center} \begin{tabular}{|c|c|c|} \hline $w$ & $\err(w)/\ulp(w) \le c_w + \ldots$ &special case\\ \hline\hline -$o(u+v)$ & $k_u 2^{e_u-e_w} + k_v 2^{e_v-e_w}$ & $k_u + k_v$ if $u v \ge 0$\\ -$o(u \cdot v)$ & $(1+c^{+}_u)k_u + (1+c^{+}_v)k_v$ & $2k_u + 2k_v$ if $u \ge x$, $v \ge y$\\ -$o(1/v)$ & $4 k_v$ & $2 k_v$ if $v \le y$ \\ -$o(u/v)$ & $4 k_u + 4 k_v$ & $2 k_u + 2 k_v$ if $v \le y$ \\ -$o(\sqrt{u})$ & $2 k_u/(1+\sqrt{c^{-}_u})$ & $k_u$ if $u \le x$ \\ -$o(e^u)$ & $e^{k_u 2^{e_u-p}} 2^{e_u+1} k_u$ & $2^{e_u+1} k_u$ if $u \ge x$ \\ -$o(\log u)$ & $k_u 2^{1-e_w}$ & \\ +$\circ(u+v)$ & $k_u 2^{e_u-e_w} + k_v 2^{e_v-e_w}$ & $k_u + k_v$ if $u v \ge 0$\\ +$\circ(u \cdot v)$ & $(1+c^{+}_u)k_u + (1+c^{+}_v)k_v$ & $2k_u + 2k_v$ if $u \ge x$, $v \ge y$\\ +$\circ(1/v)$ & $4 k_v$ & $2 k_v$ if $v \le y$ \\ +$\circ(u/v)$ & $4 k_u + 4 k_v$ & $2 k_u + 2 k_v$ if $v \le y$ \\ +$\circ(\sqrt{u})$ & $2 k_u/(1+\sqrt{c^{-}_u})$ & $k_u$ if $u \le x$ \\ +$\circ(e^u)$ & $e^{k_u 2^{e_u-p}} 2^{e_u+1} k_u$ & $2^{e_u+1} k_u$ if $u \ge x$ \\ +$\circ(\log u)$ & $k_u 2^{1-e_w}$ & \\ \hline \end{tabular} \end{center} |