gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-952


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-952-g265bcc1
Date: Mon, 1 Aug 2016 19:16:42 +0000 (UTC)

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, gawk-4.1-stable has been updated
       via  265bcc19d0ee3c8bfde5d91258345c864810e995 (commit)
       via  8518cb47f8315ea04290278e47cd44036edeaf35 (commit)
      from  1b70e3c2fe5d26e5f3cc3cb74e74e91ee038ea70 (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 -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=265bcc19d0ee3c8bfde5d91258345c864810e995

commit 265bcc19d0ee3c8bfde5d91258345c864810e995
Merge: 8518cb4 1b70e3c
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Aug 1 15:16:25 2016 -0400

    Merge branch 'gawk-4.1-stable' of ssh://git.sv.gnu.org/srv/git/gawk into 
gawk-4.1-stable

diff --cc ChangeLog
index f370fdc,45f6e62..9ac5be6
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,9 -1,8 +1,13 @@@
+ 2016-08-01         Arnold D. Robbins     <address@hidden>
+ 
+       * README, NEWS: Mark DJGPP port as unsupported.
+ 
  2016-08-01         Andrew J. Schorr     <address@hidden>
 +
 +      * mpfr.c (mpg_tofloat): Always set precision to avoid hysteresis effects
 +      from previous calculations using the same temporary mpfr variables.
 +
 +2016-08-01         Andrew J. Schorr     <address@hidden>
  
        * mpfr.c (default_prec): Add new static variable to show current PREC
        setting in effect.

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=8518cb47f8315ea04290278e47cd44036edeaf35

commit 8518cb47f8315ea04290278e47cd44036edeaf35
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Aug 1 15:15:41 2016 -0400

    Minor MPFR fix to avoid potential hysteresis effects resulting in 
higher-than-needed precision.

diff --git a/ChangeLog b/ChangeLog
index 28836da..f370fdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-08-01         Andrew J. Schorr     <address@hidden>
 
+       * mpfr.c (mpg_tofloat): Always set precision to avoid hysteresis effects
+       from previous calculations using the same temporary mpfr variables.
+
+2016-08-01         Andrew J. Schorr     <address@hidden>
+
        * mpfr.c (default_prec): Add new static variable to show current PREC
        setting in effect.
        (init_mpfr, set_PREC): Save mpfr_set_default_prec argument in
diff --git a/mpfr.c b/mpfr.c
index 0f60289..db2eb69 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1218,9 +1218,17 @@ mpg_tofloat(mpfr_ptr mf, mpz_ptr mz)
                prec -= (size_t) mpz_scan1(mz, 0);      /* least significant 1 
bit index starting at 0 */
                if (prec > MPFR_PREC_MAX)
                        prec = MPFR_PREC_MAX;
-               if (prec > PRECISION_MIN) 
-                       mpfr_set_prec(mf, prec);
+               else if (prec < PRECISION_MIN)
+                       prec = PRECISION_MIN;
        }
+       else
+               prec = PRECISION_MIN;
+       /*
+        * Always set the precision to avoid hysteresis, since do_mpfr_func 
+        * may copy our precision.
+        */
+       if (prec != mpfr_get_prec(mf))
+               mpfr_set_prec(mf, prec);
 
        mpfr_set_z(mf, mz, ROUND_MODE);
        return mf;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |    5 +++++
 mpfr.c    |   12 ++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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