summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-29 09:43:55 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-29 09:43:55 +0000
commit08951fc73f43804d77623a6f4c3c3a83fd5b8c64 (patch)
treef66dff942d544c02b367055c70ad78be7c4a4f16
parent7d700b18a4a846de758257670c7006bdee67a970 (diff)
downloadmpfr-08951fc73f43804d77623a6f4c3c3a83fd5b8c64.tar.gz
added comment
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1589 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--init2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/init2.c b/init2.c
index d64a64703..2b516df1b 100644
--- a/init2.c
+++ b/init2.c
@@ -29,6 +29,9 @@ mpfr_init2 (mpfr_ptr x, mp_prec_t p)
{
mp_size_t xsize;
+ /* p=1 is not allowed since the rounding to nearest even rule requires at
+ least two bits of mantissa: the neighbours of 3/2 are 1*2^0 and 1*2^1,
+ which both have an odd mantissa */
MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
xsize = (mp_size_t) ((p - 1) / BITS_PER_MP_LIMB) + 1;