summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-02-12 01:15:34 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-02-12 01:15:34 +0000
commit9148099c1a7acb3e52e50e5f1295d3f2743b605c (patch)
tree1268a752a694252f2733c17596ef0bad8ab7b588
parent24724d6f89a04e95f4b8d4926875d11ebc372468 (diff)
downloadmpfr-9148099c1a7acb3e52e50e5f1295d3f2743b605c.tar.gz
[src/mpfr-impl.h] Added UBF-related comments.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13703 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--src/mpfr-impl.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mpfr-impl.h b/src/mpfr-impl.h
index 86848f2c8..669a1c9bf 100644
--- a/src/mpfr-impl.h
+++ b/src/mpfr-impl.h
@@ -2593,10 +2593,18 @@ __MPFR_DECLSPEC mpfr_exp_t mpfr_ubf_diff_exp (mpfr_srcptr, mpfr_srcptr);
}
#endif
-#define MPFR_ZEXP(x) \
- ((void) (x)->_mpfr_exp /* to check that x has a correct type */, \
+/* Get the _mpfr_zexp field (pointer to a mpz_t) of a UBF object.
+ For practical reasons, the type of the argument x can be either
+ mpfr_ubf_ptr or mpfr_ptr, since the latter is used in functions
+ that accept both MPFR numbers and UBF's; this is checked by the
+ code "(x)->_mpfr_exp".
+ This macro can be used when building a UBF. So we do not check
+ that the _mpfr_exp field has the value MPFR_EXP_UBF. */
+#define MPFR_ZEXP(x) \
+ ((void) (x)->_mpfr_exp, \
((mpfr_ubf_ptr) (x))->_mpfr_zexp)
+/* If x is a UBF, clear its mpz_t exponent. */
#define MPFR_UBF_CLEAR_EXP(x) \
((void) (MPFR_IS_UBF (x) && (mpz_clear (MPFR_ZEXP (x)), 0)))