From 2c5bb5564fb00fe7f48c0c1bfaece82649b3b96a Mon Sep 17 00:00:00 2001 From: vlefevre Date: Thu, 16 Jul 2015 12:32:33 +0000 Subject: [src/mpfr.h] Added a comment about the drawback of the mpfr_get_exp() macro, defined in addition to the function. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9618 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/mpfr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mpfr.h b/src/mpfr.h index b12300988..7bb8f1307 100644 --- a/src/mpfr.h +++ b/src/mpfr.h @@ -852,8 +852,12 @@ __MPFR_DECLSPEC int mpfr_custom_get_kind _MPFR_PROTO ((mpfr_srcptr)); #define MPFR_VALUE_OF(x) (0 ? (x) : (x)) #define mpfr_get_prec(_x) MPFR_VALUE_OF((_x)->_mpfr_prec) #define mpfr_get_exp(_x) MPFR_VALUE_OF((_x)->_mpfr_exp) -/* Note: if need be, the MPFR_VALUE_OF can be used for other expressions - (of any type). Thanks to Wojtek Lerch and Tim Rentsch for the idea. */ +/* Note 1: If need be, the MPFR_VALUE_OF can be used for other expressions + (of any type). Thanks to Wojtek Lerch and Tim Rentsch for the idea. + Note 2: Defining mpfr_get_exp() as a macro has the effect to disable + the check that the argument is a pure FP number (done in the function); + this increases the risk of undetected error and makes debugging more + complex. Is it really worth in practice? (Potential FIXME) */ #define mpfr_round(a,b) mpfr_rint((a), (b), MPFR_RNDNA) #define mpfr_trunc(a,b) mpfr_rint((a), (b), MPFR_RNDZ) -- cgit v1.2.1