diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2018-02-07 14:16:47 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2018-02-07 14:16:47 -0500 |
commit | f9ff7769b7b38973bf7447b8ca596435ccf77b67 (patch) | |
tree | 28313e5d0755e3e10c10619edcc660202a0dd8fe /mpfr.c | |
parent | 9b4b32b5911b9d51643d2efd6c646f17e5214c03 (diff) | |
download | gawk-f9ff7769b7b38973bf7447b8ca596435ccf77b67.tar.gz |
Fix bug printing +"01" in regular and MPFR mode.
Diffstat (limited to 'mpfr.c')
-rw-r--r-- | mpfr.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1682,6 +1682,20 @@ mod: REPLACE(r); break; + case Op_unary_plus: + t1 = TOP_NUMBER(); + if (is_mpg_float(t1)) { + r = mpg_float(); + tval = mpfr_set(r->mpg_numbr, t1->mpg_numbr, ROUND_MODE); + IEEE_FMT(r->mpg_numbr, tval); + } else { + r = mpg_integer(); + mpz_set(r->mpg_i, t1->mpg_i); + } + DEREF(t1); + REPLACE(r); + break; + case Op_assign_plus: case Op_assign_minus: case Op_assign_times: |