[Gmp-commit] /var/hg/gmp: Use mpf_sgn to access _mp_size in gmpxx.h.
mercurial at gmplib.org
mercurial at gmplib.org
Fri Jun 2 10:18:53 UTC 2017
details: /var/hg/gmp/rev/ac7bbeaac7b2
changeset: 17418:ac7bbeaac7b2
user: Marc Glisse <marc.glisse at inria.fr>
date: Fri Jun 02 12:18:50 2017 +0200
description:
Use mpf_sgn to access _mp_size in gmpxx.h.
This helps mpf2mpfr.h without changing the generated code (at least with gcc).
diffstat:
ChangeLog | 4 ++++
gmpxx.h | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 9392a8f4cc9c -r ac7bbeaac7b2 ChangeLog
--- a/ChangeLog Fri Jun 02 02:33:52 2017 +0200
+++ b/ChangeLog Fri Jun 02 12:18:50 2017 +0200
@@ -1,3 +1,7 @@
+2017-06-02 Marc Glisse <marc.glisse at inria.fr>
+
+ * gmpxx.h (mpf_class::operator bool): Use mpf_sgn to access _mp_size.
+
2017-05-31 Torbjörn Granlund <tg at gmplib.org>
* mpn/x86_64/core2/logops_n.asm: New file.
diff -r 9392a8f4cc9c -r ac7bbeaac7b2 gmpxx.h
--- a/gmpxx.h Fri Jun 02 02:33:52 2017 +0200
+++ b/gmpxx.h Fri Jun 02 12:18:50 2017 +0200
@@ -2113,7 +2113,7 @@
// bool fits_ldouble_p() const { return mpf_fits_ldouble_p(mp); }
#if __GMPXX_USE_CXX11
- explicit operator bool() const { return mp->_mp_size != 0; }
+ explicit operator bool() const { return mpf_sgn(mp) != 0; }
#endif
// compound assignments
More information about the gmp-commit
mailing list