[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, feature/readall, updated. gawk-4.1.0-4600-gab614c8

From: Andrew J. Schorr
Subject: [SCM] gawk branch, feature/readall, updated. gawk-4.1.0-4600-gab614c8
Date: Thu, 9 Dec 2021 08:27:17 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/readall has been updated
       via  ab614c88e23d7df619e53d4b99a5fdea111ccefa (commit)
      from  c505fe66c022418251950769ac46baf187f8e7d8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit ab614c88e23d7df619e53d4b99a5fdea111ccefa
Author: Andrew J. Schorr <>
Date:   Thu Dec 9 08:26:39 2021 -0500

    When rwarray reads and writes mpfr values, use 

diff --git a/extension/ChangeLog b/extension/ChangeLog
index c71c5a0..a4b2a81 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2021-12-09         Andrew J. Schorr      <>
+       * rwarray.c (write_number, read_number): Use
+       mpfr_get_default_rounding_mode() instead of arbitrarily choosing
+       MPFR_RNDN, taking advantage of the fact that core gawk maintains
+       this using the ROUNDMODE global variable.
 2021-12-08         Andrew J. Schorr      <>
        * rwarray.c: Fix valgrind complaints related to creating mpz and mpfr
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 8d6d28e..3c74e60 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -369,8 +369,8 @@ write_number(FILE *fp, awk_value_t *val)
                        if (mpfr_fpif_export(fp, val->num_ptr) != 0)
 #define MPFR_STR_BASE  62         /* maximize base to minimize string len */
-                       /* XXX does the choice of MPFR_RNDN matter, given
+#define MPFR_STR_ROUND mpfr_get_default_rounding_mode()
+                       /* Does the choice of rounding mode matter, given
                         * that the precision is 0, so we should be rendering
                         * in full precision? */
                        /* We need to write a terminating space, since


Summary of changes:
 extension/ChangeLog | 7 +++++++
 extension/rwarray.c | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]