summaryrefslogtreecommitdiff
path: root/src/div.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-01-10 13:56:38 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2017-01-10 13:56:38 +0000
commitdc57ddfaae09313efe4f7b6c2d770b68de719a96 (patch)
tree8227c4730b026a7dfac84269dfd32fdd7ce5baf3 /src/div.c
parentf0cfde6311756c5a7e16790ab851425849dde5b2 (diff)
downloadmpfr-dc57ddfaae09313efe4f7b6c2d770b68de719a96.tar.gz
[src/div.c] added FIXME
[src/sub1sp.c] added comments git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11183 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/div.c')
-rw-r--r--src/div.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/div.c b/src/div.c
index 10367899b..350c7b4f8 100644
--- a/src/div.c
+++ b/src/div.c
@@ -99,7 +99,10 @@ mpfr_div_1 (mpfr_ptr q, mpfr_srcptr u, mpfr_srcptr v, mpfr_rnd_t rnd_mode)
u0 -= v0;
#if GMP_NUMB_BITS == 64 /* __gmpfr_invert_limb_approx only exists for 64-bit */
- /* first try with an approximate quotient */
+ /* First try with an approximate quotient.
+ FIXME: for p<=62 we have sh-1<2 and will never be able to round correctly.
+ Even for p=61 we have sh-1=2 and we can round correctly only when the two
+ last bist of q0 are 01, which happens with probability 25% only. */
{
mp_limb_t inv;
__gmpfr_invert_limb_approx (inv, v0);