diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-03-17 20:54:30 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-03-17 20:54:30 +0000 |
commit | 3db8c20108e43b15708c1d08885bf0ab7545e32d (patch) | |
tree | 2adff09c5d5d75f5353adf84321c90c62358ce10 /doc/algorithms.tex | |
parent | 5dc300ee973a86f1769a7d8cb6b13dcee1bc33bb (diff) | |
download | mpfr-3db8c20108e43b15708c1d08885bf0ab7545e32d.tar.gz |
fixed FIXME
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9011 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'doc/algorithms.tex')
-rw-r--r-- | doc/algorithms.tex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/algorithms.tex b/doc/algorithms.tex index 9f389a956..8316ee14b 100644 --- a/doc/algorithms.tex +++ b/doc/algorithms.tex @@ -4295,14 +4295,16 @@ $$ \wprec = \precc + 1 + 4 + \lceil \log_2(4\kvar)\rceil + \cond - \Exp(\svar). \subsection{Radix Conversion} -% FIXME: correct the following when b is a power of two. - The \texttt{mpfr\_get\_str} function with size $0$ and base $b$ chooses an output precision of $1 + \lceil e \log(2)/\log(b) \rceil$ for a precision -of $e$ bits if $b$ is not a power of two.\cite{Mat68} +of $e$ bits if $b$ is not a power of two \cite{Mat68}. However the code uses instead $1 + \lceil e y \rceil$, where $y$ is an upper $76$-bit approximation of $\log(2)/\log(b)$. When do both values differ? +In the case $b=2^k$, the worst case is when the first output digit contains +only one significant bit, thus +$1 + \lceil (e-1) \log(2)/\log(b) \rceil$ digits are necessary, and also +sufficient. Let $y$ be the $76$-bit upper approximation of $x=\log(2)/\log(b)$. Both values differ when there is an integer $n$ such that |