From f9ff7769b7b38973bf7447b8ca596435ccf77b67 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 7 Feb 2018 14:16:47 -0500 Subject: Fix bug printing +"01" in regular and MPFR mode. --- mpfr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mpfr.c') diff --git a/mpfr.c b/mpfr.c index 1c4a2b9b..0c962c67 100644 --- a/mpfr.c +++ b/mpfr.c @@ -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: -- cgit v1.2.1