aboutsummaryrefslogtreecommitdiffstats
path: root/extension/rwarray.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2021-12-09 08:26:39 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2021-12-09 08:26:39 -0500
commitab614c88e23d7df619e53d4b99a5fdea111ccefa (patch)
tree823a00f736b1b9de4164c8e96f4794e1d9272242 /extension/rwarray.c
parentc505fe66c022418251950769ac46baf187f8e7d8 (diff)
downloadegawk-ab614c88e23d7df619e53d4b99a5fdea111ccefa.tar.gz
egawk-ab614c88e23d7df619e53d4b99a5fdea111ccefa.tar.bz2
egawk-ab614c88e23d7df619e53d4b99a5fdea111ccefa.zip
When rwarray reads and writes mpfr values, use mpfr_get_default_rounding_mode().
Diffstat (limited to 'extension/rwarray.c')
-rw-r--r--extension/rwarray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 8d6d28ef..3c74e600 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)
#else
#define MPFR_STR_BASE 62 /* maximize base to minimize string len */
-#define MPFR_STR_ROUND MPFR_RNDN
- /* 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