summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-07-16 12:32:33 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-07-16 12:32:33 +0000
commit2c5bb5564fb00fe7f48c0c1bfaece82649b3b96a (patch)
tree394cf29887dddd717b8d530d0be2b5c1f8f826de
parent2deb427ba3d39c84fba3281c627a6cbcf4a7b706 (diff)
downloadmpfr-2c5bb5564fb00fe7f48c0c1bfaece82649b3b96a.tar.gz
[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
-rw-r--r--src/mpfr.h8
1 files 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)