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.2-stable, updated. gawk-4.1.0-283


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2839-gb7b2c08
Date: Tue, 21 Nov 2017 10:36:15 -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, gawk-4.2-stable has been updated
       via  b7b2c08b9d42630135f5a442dab69402fba86b73 (commit)
      from  ebfe279f3de64dcf53279669e61cd8db8e82db66 (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=b7b2c08b9d42630135f5a442dab69402fba86b73

commit b7b2c08b9d42630135f5a442dab69402fba86b73
Author: Andrew J. Schorr <address@hidden>
Date:   Tue Nov 21 10:35:09 2017 -0500

    Fix description of ROUNDMODE "A": it uses MPFR_RNDA to round away from zero.

diff --git a/ChangeLog b/ChangeLog
index ae0630a..3ab99ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-11-14         Andrew J. Schorr      <address@hidden>
 
+       * mpfr.c (get_rnd_mode): Fix MPFR_RNDA comment.
+
+2017-11-14         Andrew J. Schorr      <address@hidden>
+
        Fix corruption when $0 is reassigned while other NODEs have open
        references to $n. Thanks to Eric Pruitt <address@hidden> for
        the bug report.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 974fe3a..792736c 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,10 @@
+2017-11-21         Andrew J. Schorr     <address@hidden>
+
+       * gawktexi.in (Setting the Rounding Mode): Fix the description
+       of ROUNDMODE "A": it uses MPFR_RNDA mode, which rounds away from zero,
+       not "Round to nearest, ties away from zero". 
+       * gawk.1 (ROUNDMODE): Fix description of "A".
+
 2017-11-17         Arnold D. Robbins     <address@hidden>
 
        * gawktexi.in(Changes from API V1): Give a list of things
diff --git a/doc/gawk.1 b/doc/gawk.1
index 0da156d..da50bf1 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -1351,7 +1351,7 @@ The accepted values are
 \fB"D"\fR or \fB"d"\fR for roundTowardNegative,
 \fB"Z"\fR or \fB"z"\fR for roundTowardZero,
 and if your version of GNU MPFR library supports it,
-\fB"A"\fR or \fB"a"\fR for roundTiesToAway.
+\fB"A"\fR or \fB"a"\fR for rounding away from zero.
 .TP
 .B RS
 The input record separator, by default a newline.
diff --git a/doc/gawk.info b/doc/gawk.info
index 3d76c64..405313a 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -23071,16 +23071,15 @@ Round to nearest, ties to even   'roundTiesToEven'    
  '"N"' or '"n"'
 Round toward positive infinity   'roundTowardPositive'  '"U"' or '"u"'
 Round toward negative infinity   'roundTowardNegative'  '"D"' or '"d"'
 Round toward zero                'roundTowardZero'      '"Z"' or '"z"'
-Round to nearest, ties away      'roundTiesToAway'      '"A"' or '"a"'
-from zero
+Round away from zero                                    '"A"' or '"a"'
 
 Table 15.4: 'gawk' rounding modes
 
    'ROUNDMODE' has the default value '"N"', which selects the IEEE 754
 rounding mode 'roundTiesToEven'.  In *note Table 15.4:
-table-gawk-rounding-modes, the value '"A"' selects 'roundTiesToAway'.
-This is only available if your version of the MPFR library supports it;
-otherwise, setting 'ROUNDMODE' to '"A"' has no effect.
+table-gawk-rounding-modes, the value '"A"' selects rounding away from
+zero.  This is only available if your version of the MPFR library
+supports it; otherwise, setting 'ROUNDMODE' to '"A"' has no effect.
 
    The default mode 'roundTiesToEven' is the most preferred, but the
 least intuitive.  This method does the obvious thing for most values, by
@@ -23126,9 +23125,9 @@ infinity ('roundTowardPositive') and toward negative 
infinity
 ('roundTowardNegative') are often used to implement interval arithmetic,
 where you adjust the rounding mode to calculate upper and lower bounds
 for the range of output.  The 'roundTowardZero' mode can be used for
-converting floating-point numbers to integers.  The rounding mode
-'roundTiesToAway' rounds the result to the nearest number and selects
-the number with the larger magnitude if a tie occurs.
+converting floating-point numbers to integers.  When rounding away from
+zero, the nearest number with magnitude greater than or equal to the
+value is selected.
 
    Some numerical analysts will tell you that your choice of rounding
 style has tremendous impact on the final outcome, and advise you to wait
@@ -36333,160 +36332,160 @@ Node: Setting precision932239
 Ref: table-predefined-precision-strings932936
 Node: Setting the rounding mode934766
 Ref: table-gawk-rounding-modes935140
-Ref: Setting the rounding mode-Footnote-1938548
-Node: Arbitrary Precision Integers938727
-Ref: Arbitrary Precision Integers-Footnote-1941902
-Node: Checking for MPFR942051
-Node: POSIX Floating Point Problems943348
-Ref: POSIX Floating Point Problems-Footnote-1947219
-Node: Floating point summary947257
-Node: Dynamic Extensions949447
-Node: Extension Intro951000
-Node: Plugin License952266
-Node: Extension Mechanism Outline953063
-Ref: figure-load-extension953502
-Ref: figure-register-new-function955067
-Ref: figure-call-new-function956159
-Node: Extension API Description958221
-Node: Extension API Functions Introduction959863
-Node: General Data Types965403
-Ref: General Data Types-Footnote-1973764
-Node: Memory Allocation Functions974063
-Ref: Memory Allocation Functions-Footnote-1978271
-Node: Constructor Functions978370
-Node: Registration Functions981956
-Node: Extension Functions982641
-Node: Exit Callback Functions987856
-Node: Extension Version String989106
-Node: Input Parsers989769
-Node: Output Wrappers1002490
-Node: Two-way processors1007002
-Node: Printing Messages1009267
-Ref: Printing Messages-Footnote-11010438
-Node: Updating ERRNO1010591
-Node: Requesting Values1011330
-Ref: table-value-types-returned1012067
-Node: Accessing Parameters1013003
-Node: Symbol Table Access1014238
-Node: Symbol table by name1014750
-Node: Symbol table by cookie1016539
-Ref: Symbol table by cookie-Footnote-11020724
-Node: Cached values1020788
-Ref: Cached values-Footnote-11024324
-Node: Array Manipulation1024477
-Ref: Array Manipulation-Footnote-11025568
-Node: Array Data Types1025605
-Ref: Array Data Types-Footnote-11028263
-Node: Array Functions1028355
-Node: Flattening Arrays1032853
-Node: Creating Arrays1039829
-Node: Redirection API1044598
-Node: Extension API Variables1047431
-Node: Extension Versioning1048142
-Ref: gawk-api-version1048571
-Node: Extension GMP/MPFR Versioning1050299
-Node: Extension API Informational Variables1051927
-Node: Extension API Boilerplate1053000
-Node: Changes from API V11056974
-Node: Finding Extensions1058546
-Node: Extension Example1059105
-Node: Internal File Description1059903
-Node: Internal File Ops1063983
-Ref: Internal File Ops-Footnote-11075383
-Node: Using Internal File Ops1075523
-Ref: Using Internal File Ops-Footnote-11077906
-Node: Extension Samples1078180
-Node: Extension Sample File Functions1079709
-Node: Extension Sample Fnmatch1087358
-Node: Extension Sample Fork1088845
-Node: Extension Sample Inplace1090063
-Node: Extension Sample Ord1093280
-Node: Extension Sample Readdir1094116
-Ref: table-readdir-file-types1095005
-Node: Extension Sample Revout1095810
-Node: Extension Sample Rev2way1096399
-Node: Extension Sample Read write array1097139
-Node: Extension Sample Readfile1099081
-Node: Extension Sample Time1100176
-Node: Extension Sample API Tests1101524
-Node: gawkextlib1102016
-Node: Extension summary1104472
-Node: Extension Exercises1108174
-Node: Language History1109672
-Node: V7/SVR3.11111328
-Node: SVR41113480
-Node: POSIX1114914
-Node: BTL1116294
-Node: POSIX/GNU1117023
-Node: Feature History1122801
-Node: Common Extensions1138660
-Node: Ranges and Locales1139943
-Ref: Ranges and Locales-Footnote-11144559
-Ref: Ranges and Locales-Footnote-21144586
-Ref: Ranges and Locales-Footnote-31144821
-Node: Contributors1145042
-Node: History summary1150987
-Node: Installation1152367
-Node: Gawk Distribution1153311
-Node: Getting1153795
-Node: Extracting1154758
-Node: Distribution contents1156396
-Node: Unix Installation1162876
-Node: Quick Installation1163558
-Node: Shell Startup Files1165972
-Node: Additional Configuration Options1167061
-Node: Configuration Philosophy1169050
-Node: Non-Unix Installation1171419
-Node: PC Installation1171879
-Node: PC Binary Installation1172717
-Node: PC Compiling1173152
-Node: PC Using1174269
-Node: Cygwin1177314
-Node: MSYS1178084
-Node: VMS Installation1178585
-Node: VMS Compilation1179376
-Ref: VMS Compilation-Footnote-11180605
-Node: VMS Dynamic Extensions1180663
-Node: VMS Installation Details1182348
-Node: VMS Running1184601
-Node: VMS GNV1188880
-Node: VMS Old Gawk1189615
-Node: Bugs1190086
-Node: Bug address1190749
-Node: Usenet1193541
-Node: Maintainers1194318
-Node: Other Versions1195579
-Node: Installation summary1202341
-Node: Notes1203543
-Node: Compatibility Mode1204408
-Node: Additions1205190
-Node: Accessing The Source1206115
-Node: Adding Code1207552
-Node: New Ports1213771
-Node: Derived Files1218259
-Ref: Derived Files-Footnote-11223905
-Ref: Derived Files-Footnote-21223940
-Ref: Derived Files-Footnote-31224538
-Node: Future Extensions1224652
-Node: Implementation Limitations1225310
-Node: Extension Design1226493
-Node: Old Extension Problems1227647
-Ref: Old Extension Problems-Footnote-11229165
-Node: Extension New Mechanism Goals1229222
-Ref: Extension New Mechanism Goals-Footnote-11232586
-Node: Extension Other Design Decisions1232775
-Node: Extension Future Growth1234888
-Node: Old Extension Mechanism1235724
-Node: Notes summary1237487
-Node: Basic Concepts1238669
-Node: Basic High Level1239350
-Ref: figure-general-flow1239632
-Ref: figure-process-flow1240317
-Ref: Basic High Level-Footnote-11243618
-Node: Basic Data Typing1243803
-Node: Glossary1247131
-Node: Copying1278967
-Node: GNU Free Documentation License1316506
-Node: Index1341624
+Ref: Setting the rounding mode-Footnote-1938515
+Node: Arbitrary Precision Integers938694
+Ref: Arbitrary Precision Integers-Footnote-1941869
+Node: Checking for MPFR942018
+Node: POSIX Floating Point Problems943315
+Ref: POSIX Floating Point Problems-Footnote-1947186
+Node: Floating point summary947224
+Node: Dynamic Extensions949414
+Node: Extension Intro950967
+Node: Plugin License952233
+Node: Extension Mechanism Outline953030
+Ref: figure-load-extension953469
+Ref: figure-register-new-function955034
+Ref: figure-call-new-function956126
+Node: Extension API Description958188
+Node: Extension API Functions Introduction959830
+Node: General Data Types965370
+Ref: General Data Types-Footnote-1973731
+Node: Memory Allocation Functions974030
+Ref: Memory Allocation Functions-Footnote-1978238
+Node: Constructor Functions978337
+Node: Registration Functions981923
+Node: Extension Functions982608
+Node: Exit Callback Functions987823
+Node: Extension Version String989073
+Node: Input Parsers989736
+Node: Output Wrappers1002457
+Node: Two-way processors1006969
+Node: Printing Messages1009234
+Ref: Printing Messages-Footnote-11010405
+Node: Updating ERRNO1010558
+Node: Requesting Values1011297
+Ref: table-value-types-returned1012034
+Node: Accessing Parameters1012970
+Node: Symbol Table Access1014205
+Node: Symbol table by name1014717
+Node: Symbol table by cookie1016506
+Ref: Symbol table by cookie-Footnote-11020691
+Node: Cached values1020755
+Ref: Cached values-Footnote-11024291
+Node: Array Manipulation1024444
+Ref: Array Manipulation-Footnote-11025535
+Node: Array Data Types1025572
+Ref: Array Data Types-Footnote-11028230
+Node: Array Functions1028322
+Node: Flattening Arrays1032820
+Node: Creating Arrays1039796
+Node: Redirection API1044565
+Node: Extension API Variables1047398
+Node: Extension Versioning1048109
+Ref: gawk-api-version1048538
+Node: Extension GMP/MPFR Versioning1050266
+Node: Extension API Informational Variables1051894
+Node: Extension API Boilerplate1052967
+Node: Changes from API V11056941
+Node: Finding Extensions1058513
+Node: Extension Example1059072
+Node: Internal File Description1059870
+Node: Internal File Ops1063950
+Ref: Internal File Ops-Footnote-11075350
+Node: Using Internal File Ops1075490
+Ref: Using Internal File Ops-Footnote-11077873
+Node: Extension Samples1078147
+Node: Extension Sample File Functions1079676
+Node: Extension Sample Fnmatch1087325
+Node: Extension Sample Fork1088812
+Node: Extension Sample Inplace1090030
+Node: Extension Sample Ord1093247
+Node: Extension Sample Readdir1094083
+Ref: table-readdir-file-types1094972
+Node: Extension Sample Revout1095777
+Node: Extension Sample Rev2way1096366
+Node: Extension Sample Read write array1097106
+Node: Extension Sample Readfile1099048
+Node: Extension Sample Time1100143
+Node: Extension Sample API Tests1101491
+Node: gawkextlib1101983
+Node: Extension summary1104439
+Node: Extension Exercises1108141
+Node: Language History1109639
+Node: V7/SVR3.11111295
+Node: SVR41113447
+Node: POSIX1114881
+Node: BTL1116261
+Node: POSIX/GNU1116990
+Node: Feature History1122768
+Node: Common Extensions1138627
+Node: Ranges and Locales1139910
+Ref: Ranges and Locales-Footnote-11144526
+Ref: Ranges and Locales-Footnote-21144553
+Ref: Ranges and Locales-Footnote-31144788
+Node: Contributors1145009
+Node: History summary1150954
+Node: Installation1152334
+Node: Gawk Distribution1153278
+Node: Getting1153762
+Node: Extracting1154725
+Node: Distribution contents1156363
+Node: Unix Installation1162843
+Node: Quick Installation1163525
+Node: Shell Startup Files1165939
+Node: Additional Configuration Options1167028
+Node: Configuration Philosophy1169017
+Node: Non-Unix Installation1171386
+Node: PC Installation1171846
+Node: PC Binary Installation1172684
+Node: PC Compiling1173119
+Node: PC Using1174236
+Node: Cygwin1177281
+Node: MSYS1178051
+Node: VMS Installation1178552
+Node: VMS Compilation1179343
+Ref: VMS Compilation-Footnote-11180572
+Node: VMS Dynamic Extensions1180630
+Node: VMS Installation Details1182315
+Node: VMS Running1184568
+Node: VMS GNV1188847
+Node: VMS Old Gawk1189582
+Node: Bugs1190053
+Node: Bug address1190716
+Node: Usenet1193508
+Node: Maintainers1194285
+Node: Other Versions1195546
+Node: Installation summary1202308
+Node: Notes1203510
+Node: Compatibility Mode1204375
+Node: Additions1205157
+Node: Accessing The Source1206082
+Node: Adding Code1207519
+Node: New Ports1213738
+Node: Derived Files1218226
+Ref: Derived Files-Footnote-11223872
+Ref: Derived Files-Footnote-21223907
+Ref: Derived Files-Footnote-31224505
+Node: Future Extensions1224619
+Node: Implementation Limitations1225277
+Node: Extension Design1226460
+Node: Old Extension Problems1227614
+Ref: Old Extension Problems-Footnote-11229132
+Node: Extension New Mechanism Goals1229189
+Ref: Extension New Mechanism Goals-Footnote-11232553
+Node: Extension Other Design Decisions1232742
+Node: Extension Future Growth1234855
+Node: Old Extension Mechanism1235691
+Node: Notes summary1237454
+Node: Basic Concepts1238636
+Node: Basic High Level1239317
+Ref: figure-general-flow1239599
+Ref: figure-process-flow1240284
+Ref: Basic High Level-Footnote-11243585
+Node: Basic Data Typing1243770
+Node: Glossary1247098
+Node: Copying1278934
+Node: GNU Free Documentation License1316473
+Node: Index1341591
 
 End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 78a21b8..2a0653f 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -31852,14 +31852,14 @@ rounding modes is shown in 
@ref{table-gawk-rounding-modes}.
 @item Round toward positive infinity @tab @code{roundTowardPositive} @tab 
@code{"U"} or @code{"u"}
 @item Round toward negative infinity @tab @code{roundTowardNegative} @tab 
@code{"D"} or @code{"d"}
 @item Round toward zero @tab @code{roundTowardZero} @tab @code{"Z"} or 
@code{"z"}
address@hidden Round to nearest, ties away from zero @tab 
@code{roundTiesToAway} @tab @code{"A"} or @code{"a"}
address@hidden Round away from zero @tab @tab @code{"A"} or @code{"a"}
 @end multitable
 @end float
 
 @code{ROUNDMODE} has the default value @code{"N"}, which
 selects the IEEE 754 rounding mode @code{roundTiesToEven}.
 In @ref{table-gawk-rounding-modes}, the value @code{"A"} selects
address@hidden  This is only available if your version of the
+rounding away from zero. This is only available if your version of the
 MPFR library supports it; otherwise, setting @code{ROUNDMODE} to @code{"A"}
 has no effect.
 
@@ -31916,9 +31916,9 @@ The other rounding modes are rarely used.  Rounding 
toward positive infinity
 (@code{roundTowardNegative}) are often used to implement interval
 arithmetic, where you adjust the rounding mode to calculate upper and
 lower bounds for the range of output. The @code{roundTowardZero} mode can
-be used for converting floating-point numbers to integers.  The rounding
-mode @code{roundTiesToAway} rounds the result to the nearest number and
-selects the number with the larger magnitude if a tie occurs.
+be used for converting floating-point numbers to integers.  When rounding
+away from zero, the nearest number with magnitude greater than or equal to
+the value is selected.
 
 Some numerical analysts will tell you that your choice of rounding
 style has tremendous impact on the final outcome, and advise you to
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index e1b318c..df9439d 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -30866,14 +30866,14 @@ rounding modes is shown in 
@ref{table-gawk-rounding-modes}.
 @item Round toward positive infinity @tab @code{roundTowardPositive} @tab 
@code{"U"} or @code{"u"}
 @item Round toward negative infinity @tab @code{roundTowardNegative} @tab 
@code{"D"} or @code{"d"}
 @item Round toward zero @tab @code{roundTowardZero} @tab @code{"Z"} or 
@code{"z"}
address@hidden Round to nearest, ties away from zero @tab 
@code{roundTiesToAway} @tab @code{"A"} or @code{"a"}
address@hidden Round away from zero @tab @tab @code{"A"} or @code{"a"}
 @end multitable
 @end float
 
 @code{ROUNDMODE} has the default value @code{"N"}, which
 selects the IEEE 754 rounding mode @code{roundTiesToEven}.
 In @ref{table-gawk-rounding-modes}, the value @code{"A"} selects
address@hidden  This is only available if your version of the
+rounding away from zero. This is only available if your version of the
 MPFR library supports it; otherwise, setting @code{ROUNDMODE} to @code{"A"}
 has no effect.
 
@@ -30930,9 +30930,9 @@ The other rounding modes are rarely used.  Rounding 
toward positive infinity
 (@code{roundTowardNegative}) are often used to implement interval
 arithmetic, where you adjust the rounding mode to calculate upper and
 lower bounds for the range of output. The @code{roundTowardZero} mode can
-be used for converting floating-point numbers to integers.  The rounding
-mode @code{roundTiesToAway} rounds the result to the nearest number and
-selects the number with the larger magnitude if a tie occurs.
+be used for converting floating-point numbers to integers.  When rounding
+away from zero, the nearest number with magnitude greater than or equal to
+the value is selected.
 
 Some numerical analysts will tell you that your choice of rounding
 style has tremendous impact on the final outcome, and advise you to
diff --git a/mpfr.c b/mpfr.c
index abd9ca6..b9208a6 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -571,7 +571,7 @@ get_rnd_mode(const char rmode)
 #if defined(MPFR_VERSION_MAJOR) && MPFR_VERSION_MAJOR > 2
        case 'A':
        case 'a':
-               return MPFR_RNDA;       /* round away from zero (IEEE-754 
roundTiesToAway) */
+               return MPFR_RNDA;       /* round away from zero */
 #endif
        default:
                break;

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

Summary of changes:
 ChangeLog       |   4 +
 doc/ChangeLog   |   7 ++
 doc/gawk.1      |   2 +-
 doc/gawk.info   | 325 ++++++++++++++++++++++++++++----------------------------
 doc/gawk.texi   |  10 +-
 doc/gawktexi.in |  10 +-
 mpfr.c          |   2 +-
 7 files changed, 185 insertions(+), 175 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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