1% This file is part of crlibm, the correctly rounded mathematical library,
2% which has been developed by the Arénaire project at École normale supérieure
3% de Lyon.
4%
5% Copyright (C) 2004-2011 David Defour, Catherine Daramy-Loirat,
6% Florent de Dinechin, Matthieu Gallet, Nicolas Gast, Christoph Quirin Lauter,
7% and Jean-Michel Muller
8%
9% This library is free software; you can redistribute it and/or
10% modify it under the terms of the GNU Lesser General Public
11% License as published by the Free Software Foundation; either
12% version 2.1 of the License, or (at your option) any later version.
13%
14% This library is distributed in the hope that it will be useful,
15% but WITHOUT ANY WARRANTY; without even the implied warranty of
16% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17% Lesser General Public License for more details.
18%
19% You should have received a copy of the GNU Lesser General Public
20% License along with this library; if not, write to the Free Software
21% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
23
24This chapter is contributed by Ch. Q. Lauter and F. de Dinechin.
25
26
27
28
29\section{Work in progress}
30
31Here is the status of the current implementation of pow in CRLibm:
32
33\begin{itemize}
34\item Exact and mid-point cases are handled properly
35  \cite{LauterLefevre2007}. This is especially important because an
36  exact case would mean an infinite Ziv iteration.
37
38\item Worst cases are not known for the full input range. This is a
39  deep theoretical issue. Recent research has focussed on $x^n$ for
40  integer $n$. At the time of release, it has been proved
41  computationally that that an intermediate precision of $2^{-118}$ is
42  enough to round correctly $x^n$ for all integer $n$ between -180 and
43  +1338. In addition, specific algorithms have been studied for the
44  computation of $x^n$ \cite{KorLauLefLouvMul2008}.
45
46\item Due to lack of time, only round-to-nearest is
47  implemented. Directed rounding requires additional work, in
48  particular in subnormal handling and in exact case management. There
49  are more exact cases in directed rounding modes, therefore the
50  performance should also be inferior.
51
52\item The current implementation computes two Ziv iterations, to
53  $2^{-61}$ then to $2^{-120}$. With current technology, there is
54  little hope to find all the worst cases for the full range of the
55  power function. Should an input require more than $2^{-120}$ happen
56  (to our knowledge none has been exhibited so far), current
57  implementation will not necessarily return the correctly rounded
58  result. Options are:
59  \begin{itemize}
60  \item Ignore silently the problem (this is the current option).
61  \item perform a second rounding test at the end of the accurate
62    step. If the test fails (with a  probability
63      smaller that $2^{-120}$),
64    \begin{itemize}
65    \item an arbitrary precision computation could be launched, for
66      example MPFR. This requires adding a dependency to MPFR only for
67      this highly improbable case.
68    \item launch a high, but not arbitrary precision third step (say,
69      accurate to $2^{-3000}$. Variations of the SLZ algorithm
70      \cite{Stehle-thesis} could provide, at an acceptable
71      computational cost, a certificate that there is no worst case
72      requiring a larger precision. This is the only fully satisfactory solution that seems at reach, but this idea remains to be explored.
73    \item (in addition to the previous) a message on the standard error could be written, including
74      the corresponding inputs, and inviting anyone who reads it to
75      send us a mail. Considering the probability, we might wait
76      several centuries before getting the first mail.
77    \end{itemize}
78
79  \end{itemize}
80
81
82
83\end{itemize}
84
85
86
87%%% Local Variables:
88%%% mode: latex
89%%% TeX-master: "crlibm"
90%%% End:
91
92