[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawkdiffs] [SCM] gawk branch, gawk_mpfr, updated. 2aa4ca2371c89581a5cb
From: 
Arnold Robbins 
Subject: 
[gawkdiffs] [SCM] gawk branch, gawk_mpfr, updated. 2aa4ca2371c89581a5cb0cbec0882f5ef1efa1f3 
Date: 
Sun, 08 Apr 2012 11:55:43 +0000 
This is an automated email from the git hooks/postreceive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk_mpfr has been updated
via 2aa4ca2371c89581a5cb0cbec0882f5ef1efa1f3 (commit)
from 04da4b1daaf7e932d60a5d944732318350b47073 (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=2aa4ca2371c89581a5cb0cbec0882f5ef1efa1f3
commit 2aa4ca2371c89581a5cb0cbec0882f5ef1efa1f3
Author: Arnold D. Robbins <address@hidden>
Date: Sun Apr 8 14:55:07 2012 +0300
Edit doc. Bring awkgram.c and command.c up to date.
diff git a/awkgram.c b/awkgram.c
index df5d6b1..4bd9f09 100644
 a/awkgram.c
+++ b/awkgram.c
@@ 2039,7 +2039,7 @@ yyreduce:
{
case 3:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 195 "awkgram.y"
{
rule = 0;
@@ 2049,7 +2049,7 @@ yyreduce:
case 5:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 201 "awkgram.y"
{
next_sourcefile();
@@ 2058,7 +2058,7 @@ yyreduce:
case 6:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 205 "awkgram.y"
{
rule = 0;
@@ 2072,7 +2072,7 @@ yyreduce:
case 7:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 217 "awkgram.y"
{
(void) append_rule((yyvsp[(1)  (2)]), (yyvsp[(2)  (2)]));
@@ 2081,7 +2081,7 @@ yyreduce:
case 8:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 221 "awkgram.y"
{
if (rule != Rule) {
@@ 2097,7 +2097,7 @@ yyreduce:
case 9:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 232 "awkgram.y"
{
in_function = NULL;
@@ 2108,7 +2108,7 @@ yyreduce:
case 10:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 238 "awkgram.y"
{
want_source = FALSE;
@@ 2118,7 +2118,7 @@ yyreduce:
case 11:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 246 "awkgram.y"
{
if (include_source((yyvsp[(1)  (1)])) < 0)
@@ 2131,35 +2131,35 @@ yyreduce:
case 12:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 254 "awkgram.y"
{ (yyval) = NULL; }
break;
case 13:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 256 "awkgram.y"
{ (yyval) = NULL; }
break;
case 14:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 261 "awkgram.y"
{ (yyval) = NULL; rule = Rule; }
break;
case 15:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 263 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); rule = Rule; }
break;
case 16:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 265 "awkgram.y"
{
INSTRUCTION *tp;
@@ 2190,7 +2190,7 @@ yyreduce:
case 17:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 291 "awkgram.y"
{
static int begin_seen = 0;
@@ 2206,7 +2206,7 @@ yyreduce:
case 18:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 302 "awkgram.y"
{
static int end_seen = 0;
@@ 2222,7 +2222,7 @@ yyreduce:
case 19:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 313 "awkgram.y"
{
(yyvsp[(1)  (1)])>in_rule = rule = BEGINFILE;
@@ 2233,7 +2233,7 @@ yyreduce:
case 20:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 319 "awkgram.y"
{
(yyvsp[(1)  (1)])>in_rule = rule = ENDFILE;
@@ 2244,7 +2244,7 @@ yyreduce:
case 21:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 328 "awkgram.y"
{
if ((yyvsp[(2)  (5)]) == NULL)
@@ 2256,21 +2256,21 @@ yyreduce:
case 22:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 338 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 23:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 340 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 24:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 342 "awkgram.y"
{
yyerror(_("`%s' is a builtin function, it cannot be
redefined"),
@@ 2281,14 +2281,14 @@ yyreduce:
case 25:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 348 "awkgram.y"
{ (yyval) = (yyvsp[(2)  (2)]); }
break;
case 28:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 358 "awkgram.y"
{
(yyvsp[(1)  (6)])>source_file = source;
@@ 2304,14 +2304,14 @@ yyreduce:
case 29:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 376 "awkgram.y"
{ ++want_regexp; }
break;
case 30:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 378 "awkgram.y"
{
NODE *n, *exp;
@@ 2345,21 +2345,21 @@ yyreduce:
case 31:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 410 "awkgram.y"
{ bcfree((yyvsp[(1)  (1)])); }
break;
case 33:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 416 "awkgram.y"
{ (yyval) = NULL; }
break;
case 34:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 418 "awkgram.y"
{
if ((yyvsp[(2)  (2)]) == NULL)
@@ 2377,28 +2377,28 @@ yyreduce:
case 35:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 431 "awkgram.y"
{ (yyval) = NULL; }
break;
case 38:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 441 "awkgram.y"
{ (yyval) = NULL; }
break;
case 39:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 443 "awkgram.y"
{ (yyval) = (yyvsp[(2)  (3)]); }
break;
case 40:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 445 "awkgram.y"
{
if (do_pretty_print)
@@ 2410,7 +2410,7 @@ yyreduce:
case 41:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 452 "awkgram.y"
{
INSTRUCTION *dflt, *curr = NULL, *cexp, *cstmt;
@@ 2505,7 +2505,7 @@ yyreduce:
case 42:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 542 "awkgram.y"
{
/*
@@ 2552,7 +2552,7 @@ yyreduce:
case 43:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 584 "awkgram.y"
{
/*
@@ 2599,7 +2599,7 @@ yyreduce:
case 44:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 626 "awkgram.y"
{
INSTRUCTION *ip;
@@ 2717,7 +2717,7 @@ regular_loop:
case 45:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 739 "awkgram.y"
{
(yyval) = mk_for_loop((yyvsp[(1)  (12)]), (yyvsp[(3)  (12)]),
(yyvsp[(6)  (12)]), (yyvsp[(9)  (12)]), (yyvsp[(12)  (12)]));
@@ 2729,7 +2729,7 @@ regular_loop:
case 46:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 746 "awkgram.y"
{
(yyval) = mk_for_loop((yyvsp[(1)  (11)]), (yyvsp[(3)  (11)]),
(INSTRUCTION *) NULL, (yyvsp[(8)  (11)]), (yyvsp[(11)  (11)]));
@@ 2741,7 +2741,7 @@ regular_loop:
case 47:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 753 "awkgram.y"
{
if (do_pretty_print)
@@ 2753,7 +2753,7 @@ regular_loop:
case 48:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 763 "awkgram.y"
{
if (! break_allowed)
@@ 2767,7 +2767,7 @@ regular_loop:
case 49:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 772 "awkgram.y"
{
if (! continue_allowed)
@@ 2781,7 +2781,7 @@ regular_loop:
case 50:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 781 "awkgram.y"
{
/* if inside function (rule = 0), resolve context at runtime */
@@ 2795,7 +2795,7 @@ regular_loop:
case 51:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 790 "awkgram.y"
{
if (do_traditional)
@@ 2815,7 +2815,7 @@ regular_loop:
case 52:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 805 "awkgram.y"
{
/* Initialize the two possible jump targets, the actual target
@@ 2835,7 +2835,7 @@ regular_loop:
case 53:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 820 "awkgram.y"
{
if (! in_function)
@@ 2845,7 +2845,7 @@ regular_loop:
case 54:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 823 "awkgram.y"
{
if ((yyvsp[(3)  (4)]) == NULL) {
@@ 2871,14 +2871,14 @@ regular_loop:
case 56:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 855 "awkgram.y"
{ in_print = TRUE; in_parens = 0; }
break;
case 57:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 856 "awkgram.y"
{
/*
@@ 2980,14 +2980,14 @@ regular_print:
case 58:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 953 "awkgram.y"
{ sub_counter = 0; }
break;
case 59:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 954 "awkgram.y"
{
char *arr = (yyvsp[(2)  (4)])>lextok;
@@ 3017,7 +3017,7 @@ regular_print:
case 60:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 983 "awkgram.y"
{
static short warned = FALSE;
@@ 3041,35 +3041,35 @@ regular_print:
case 61:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1002 "awkgram.y"
{ (yyval) = optimize_assignment((yyvsp[(1)  (1)])); }
break;
case 62:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1007 "awkgram.y"
{ (yyval) = NULL; }
break;
case 63:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1009 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 64:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1014 "awkgram.y"
{ (yyval) = NULL; }
break;
case 65:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1016 "awkgram.y"
{
if ((yyvsp[(1)  (2)]) == NULL)
@@ 3081,14 +3081,14 @@ regular_print:
case 66:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1023 "awkgram.y"
{ (yyval) = NULL; }
break;
case 67:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1028 "awkgram.y"
{
INSTRUCTION *casestmt = (yyvsp[(5)  (5)]);
@@ 3105,7 +3105,7 @@ regular_print:
case 68:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1040 "awkgram.y"
{
INSTRUCTION *casestmt = (yyvsp[(4)  (4)]);
@@ 3121,14 +3121,14 @@ regular_print:
case 69:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1054 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 70:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1056 "awkgram.y"
{
NODE *n = (yyvsp[(2)  (2)])>memory;
@@ 3141,7 +3141,7 @@ regular_print:
case 71:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1064 "awkgram.y"
{
bcfree((yyvsp[(1)  (2)]));
@@ 3151,14 +3151,14 @@ regular_print:
case 72:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1069 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 73:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1071 "awkgram.y"
{
(yyvsp[(1)  (1)])>opcode = Op_push_re;
@@ 3168,21 +3168,21 @@ regular_print:
case 74:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1079 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 75:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1081 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 77:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1091 "awkgram.y"
{
(yyval) = (yyvsp[(2)  (3)]);
@@ 3191,7 +3191,7 @@ regular_print:
case 78:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1098 "awkgram.y"
{
in_print = FALSE;
@@ 3202,14 +3202,14 @@ regular_print:
case 79:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1103 "awkgram.y"
{ in_print = FALSE; in_parens = 0; }
break;
case 80:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1104 "awkgram.y"
{
if ((yyvsp[(1)  (3)])>redir_type == redirect_twoway
@@ 3222,7 +3222,7 @@ regular_print:
case 81:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1115 "awkgram.y"
{
(yyval) = mk_condition((yyvsp[(3)  (6)]), (yyvsp[(1)  (6)]),
(yyvsp[(6)  (6)]), NULL, NULL);
@@ 3231,7 +3231,7 @@ regular_print:
case 82:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1120 "awkgram.y"
{
(yyval) = mk_condition((yyvsp[(3)  (9)]), (yyvsp[(1)  (9)]),
(yyvsp[(6)  (9)]), (yyvsp[(7)  (9)]), (yyvsp[(9)  (9)]));
@@ 3240,14 +3240,14 @@ regular_print:
case 87:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1137 "awkgram.y"
{ (yyval) = NULL; }
break;
case 88:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1139 "awkgram.y"
{
bcfree((yyvsp[(1)  (2)]));
@@ 3257,21 +3257,21 @@ regular_print:
case 89:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1147 "awkgram.y"
{ (yyval) = NULL; }
break;
case 90:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1149 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]) ; }
break;
case 91:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1154 "awkgram.y"
{
(yyvsp[(1)  (1)])>param_count = 0;
@@ 3281,7 +3281,7 @@ regular_print:
case 92:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1159 "awkgram.y"
{
(yyvsp[(3)  (3)])>param_count = (yyvsp[(1) 
(3)])>lasti>param_count + 1;
@@ 3292,63 +3292,63 @@ regular_print:
case 93:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1165 "awkgram.y"
{ (yyval) = NULL; }
break;
case 94:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1167 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (2)]); }
break;
case 95:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1169 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (3)]); }
break;
case 96:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1175 "awkgram.y"
{ (yyval) = NULL; }
break;
case 97:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1177 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 98:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1182 "awkgram.y"
{ (yyval) = NULL; }
break;
case 99:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1184 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 100:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1189 "awkgram.y"
{ (yyval) = mk_expression_list(NULL, (yyvsp[(1)  (1)])); }
break;
case 101:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1191 "awkgram.y"
{
(yyval) = mk_expression_list((yyvsp[(1)  (3)]), (yyvsp[(3) 
(3)]));
@@ 3358,35 +3358,35 @@ regular_print:
case 102:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1196 "awkgram.y"
{ (yyval) = NULL; }
break;
case 103:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1198 "awkgram.y"
{ (yyval) = NULL; }
break;
case 104:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1200 "awkgram.y"
{ (yyval) = NULL; }
break;
case 105:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1202 "awkgram.y"
{ (yyval) = NULL; }
break;
case 106:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1208 "awkgram.y"
{
if (do_lint && (yyvsp[(3)  (3)])>lasti>opcode ==
Op_match_rec)
@@ 3398,21 +3398,21 @@ regular_print:
case 107:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1215 "awkgram.y"
{ (yyval) = mk_boolean((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2)
 (3)])); }
break;
case 108:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1217 "awkgram.y"
{ (yyval) = mk_boolean((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2)
 (3)])); }
break;
case 109:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1219 "awkgram.y"
{
if ((yyvsp[(1)  (3)])>lasti>opcode == Op_match_rec)
@@ 3433,7 +3433,7 @@ regular_print:
case 110:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1235 "awkgram.y"
{
if (do_lint_old)
@@ 3448,7 +3448,7 @@ regular_print:
case 111:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1245 "awkgram.y"
{
if (do_lint && (yyvsp[(3)  (3)])>lasti>opcode ==
Op_match_rec)
@@ 3460,35 +3460,35 @@ regular_print:
case 112:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1252 "awkgram.y"
{ (yyval) = mk_condition((yyvsp[(1)  (5)]), (yyvsp[(2)  (5)]),
(yyvsp[(3)  (5)]), (yyvsp[(4)  (5)]), (yyvsp[(5)  (5)])); }
break;
case 113:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1254 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 114:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1259 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 115:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1261 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 116:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1263 "awkgram.y"
{
(yyvsp[(2)  (2)])>opcode = Op_assign_quotient;
@@ 3498,49 +3498,49 @@ regular_print:
case 117:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1271 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 118:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1273 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 119:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1278 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 120:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1280 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 121:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1285 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 122:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1287 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 123:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1289 "awkgram.y"
{
int count = 2;
@@ 3592,49 +3592,49 @@ regular_print:
case 125:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1341 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 126:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1343 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 127:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1345 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 128:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1347 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 129:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1349 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 130:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1351 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 131:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1353 "awkgram.y"
{
/*
@@ 3662,7 +3662,7 @@ regular_print:
case 132:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1376 "awkgram.y"
{
(yyvsp[(2)  (2)])>opcode = Op_postincrement;
@@ 3672,7 +3672,7 @@ regular_print:
case 133:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1381 "awkgram.y"
{
(yyvsp[(2)  (2)])>opcode = Op_postdecrement;
@@ 3682,7 +3682,7 @@ regular_print:
case 134:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1386 "awkgram.y"
{
if (do_lint_old) {
@@ 3707,7 +3707,7 @@ regular_print:
case 135:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1411 "awkgram.y"
{
(yyval) = mk_getline((yyvsp[(3)  (4)]), (yyvsp[(4)  (4)]),
(yyvsp[(1)  (4)]), (yyvsp[(2)  (4)])>redir_type);
@@ 3717,49 +3717,49 @@ regular_print:
case 136:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1417 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 137:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1419 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 138:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1421 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 139:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1423 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 140:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1425 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 141:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1427 "awkgram.y"
{ (yyval) = mk_binary((yyvsp[(1)  (3)]), (yyvsp[(3)  (3)]), (yyvsp[(2) 
(3)])); }
break;
case 142:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1432 "awkgram.y"
{
(yyval) = list_create((yyvsp[(1)  (1)]));
@@ 3768,7 +3768,7 @@ regular_print:
case 143:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1436 "awkgram.y"
{
if ((yyvsp[(2)  (2)])>opcode == Op_match_rec) {
@@ 3805,14 +3805,14 @@ regular_print:
case 144:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1468 "awkgram.y"
{ (yyval) = (yyvsp[(2)  (3)]); }
break;
case 145:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1470 "awkgram.y"
{
(yyval) = snode((yyvsp[(3)  (4)]), (yyvsp[(1)  (4)]));
@@ 3823,7 +3823,7 @@ regular_print:
case 146:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1476 "awkgram.y"
{
(yyval) = snode((yyvsp[(3)  (4)]), (yyvsp[(1)  (4)]));
@@ 3834,7 +3834,7 @@ regular_print:
case 147:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1482 "awkgram.y"
{
static short warned1 = FALSE;
@@ 3852,7 +3852,7 @@ regular_print:
case 150:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1497 "awkgram.y"
{
(yyvsp[(1)  (2)])>opcode = Op_preincrement;
@@ 3862,7 +3862,7 @@ regular_print:
case 151:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1502 "awkgram.y"
{
(yyvsp[(1)  (2)])>opcode = Op_predecrement;
@@ 3872,7 +3872,7 @@ regular_print:
case 152:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1507 "awkgram.y"
{
(yyval) = list_create((yyvsp[(1)  (1)]));
@@ 3881,7 +3881,7 @@ regular_print:
case 153:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1511 "awkgram.y"
{
(yyval) = list_create((yyvsp[(1)  (1)]));
@@ 3890,7 +3890,7 @@ regular_print:
case 154:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1515 "awkgram.y"
{
if ((yyvsp[(2)  (2)])>lasti>opcode == Op_push_i
@@ 3912,7 +3912,7 @@ regular_print:
case 155:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1532 "awkgram.y"
{
/*
@@ 3927,7 +3927,7 @@ regular_print:
case 156:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1545 "awkgram.y"
{
func_use((yyvsp[(1)  (1)])>lasti>func_name, FUNC_USE);
@@ 3937,7 +3937,7 @@ regular_print:
case 157:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1550 "awkgram.y"
{
/* indirect function call */
@@ 3975,7 +3975,7 @@ regular_print:
case 158:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1586 "awkgram.y"
{
param_sanity((yyvsp[(3)  (4)]));
@@ 3994,42 +3994,42 @@ regular_print:
case 159:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1603 "awkgram.y"
{ (yyval) = NULL; }
break;
case 160:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1605 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 161:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1610 "awkgram.y"
{ (yyval) = NULL; }
break;
case 162:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1612 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (2)]); }
break;
case 163:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1617 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 164:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1619 "awkgram.y"
{
(yyval) = list_merge((yyvsp[(1)  (2)]), (yyvsp[(2)  (2)]));
@@ 4038,7 +4038,7 @@ regular_print:
case 165:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1626 "awkgram.y"
{
INSTRUCTION *ip = (yyvsp[(1)  (1)])>lasti;
@@ 4057,7 +4057,7 @@ regular_print:
case 166:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1643 "awkgram.y"
{
INSTRUCTION *t = (yyvsp[(2)  (3)]);
@@ 4076,14 +4076,14 @@ regular_print:
case 167:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1660 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 168:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1662 "awkgram.y"
{
(yyval) = list_merge((yyvsp[(1)  (2)]), (yyvsp[(2)  (2)]));
@@ 4092,14 +4092,14 @@ regular_print:
case 169:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1669 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (2)]); }
break;
case 170:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1674 "awkgram.y"
{
char *var_name = (yyvsp[(1)  (1)])>lextok;
@@ 4112,7 +4112,7 @@ regular_print:
case 171:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1682 "awkgram.y"
{
char *arr = (yyvsp[(1)  (2)])>lextok;
@@ 4124,7 +4124,7 @@ regular_print:
case 172:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1692 "awkgram.y"
{
INSTRUCTION *ip = (yyvsp[(1)  (1)])>nexti;
@@ 4141,7 +4141,7 @@ regular_print:
case 173:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1704 "awkgram.y"
{
(yyval) = list_append((yyvsp[(2)  (3)]), (yyvsp[(1)  (3)]));
@@ 4152,7 +4152,7 @@ regular_print:
case 174:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1713 "awkgram.y"
{
(yyvsp[(1)  (1)])>opcode = Op_postincrement;
@@ 4161,7 +4161,7 @@ regular_print:
case 175:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1717 "awkgram.y"
{
(yyvsp[(1)  (1)])>opcode = Op_postdecrement;
@@ 4170,49 +4170,49 @@ regular_print:
case 176:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1720 "awkgram.y"
{ (yyval) = NULL; }
break;
case 178:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1728 "awkgram.y"
{ yyerrok; }
break;
case 179:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1732 "awkgram.y"
{ yyerrok; }
break;
case 182:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1741 "awkgram.y"
{ yyerrok; }
break;
case 183:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1745 "awkgram.y"
{ (yyval) = (yyvsp[(1)  (1)]); yyerrok; }
break;
case 184:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 1749 "awkgram.y"
{ yyerrok; }
break;
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 4229 "awkgram.c"
default: break;
}
diff git a/command.c b/command.c
index 1117556..fb6abf8 100644
 a/command.c
+++ b/command.c
@@ 1713,7 +1713,7 @@ yyreduce:
{
case 3:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 109 "command.y"
{
cmd_idx = 1;
@@ 1733,7 +1733,7 @@ yyreduce:
case 5:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 128 "command.y"
{
if (errcount == 0 && cmd_idx >= 0) {
@@ 1788,7 +1788,7 @@ yyreduce:
case 6:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 178 "command.y"
{
yyerrok;
@@ 1797,14 +1797,14 @@ yyreduce:
case 22:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 212 "command.y"
{ want_nodeval = TRUE; }
break;
case 23:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 217 "command.y"
{
if (errcount == 0) {
@@ 1824,7 +1824,7 @@ yyreduce:
case 24:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 235 "command.y"
{
(yyval) = append_statement(arg_list, (char *) start_EVAL);
@@ 1837,14 +1837,14 @@ yyreduce:
case 25:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 242 "command.y"
{ (yyval) = append_statement((yyvsp[(1)  (2)]), lexptr_begin); }
break;
case 26:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 243 "command.y"
{
(yyval) = (yyvsp[(3)  (4)]);
@@ 1853,7 +1853,7 @@ yyreduce:
case 27:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 250 "command.y"
{
arg_list = append_statement((yyvsp[(2)  (3)]), (char *)
end_EVAL);
@@ 1874,7 +1874,7 @@ yyreduce:
case 28:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 266 "command.y"
{
NODE *n;
@@ 1890,7 +1890,7 @@ yyreduce:
case 34:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 285 "command.y"
{
if (cmdtab[cmd_idx].class == D_FRAME
@@ 1901,7 +1901,7 @@ yyreduce:
case 35:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 291 "command.y"
{
int idx = find_argument((yyvsp[(2)  (2)]));
@@ 1918,49 +1918,49 @@ yyreduce:
case 38:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 304 "command.y"
{ want_nodeval = TRUE; }
break;
case 40:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 305 "command.y"
{ want_nodeval = TRUE; }
break;
case 46:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 310 "command.y"
{ want_nodeval = TRUE; }
break;
case 49:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 312 "command.y"
{ want_nodeval = TRUE; }
break;
case 51:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 313 "command.y"
{ want_nodeval = TRUE; }
break;
case 53:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 314 "command.y"
{ want_nodeval = TRUE; }
break;
case 57:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 318 "command.y"
{
if (in_cmd_src((yyvsp[(2)  (2)])>a_string))
@@ 1970,7 +1970,7 @@ yyreduce:
case 58:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 323 "command.y"
{
if (! input_from_tty)
@@ 1980,7 +1980,7 @@ yyreduce:
case 59:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 328 "command.y"
{
int type = 0;
@@ 2011,7 +2011,7 @@ yyreduce:
case 60:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 354 "command.y"
{
if (! in_commands)
@@ 2026,7 +2026,7 @@ yyreduce:
case 61:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 364 "command.y"
{
if (! in_commands)
@@ 2036,7 +2036,7 @@ yyreduce:
case 62:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 369 "command.y"
{
int idx = find_argument((yyvsp[(2)  (2)]));
@@ 2053,14 +2053,14 @@ yyreduce:
case 63:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 380 "command.y"
{ want_nodeval = TRUE; }
break;
case 64:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 381 "command.y"
{
int type;
@@ 2073,7 +2073,7 @@ yyreduce:
case 65:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 389 "command.y"
{
if (in_commands) {
@@ 2089,7 +2089,7 @@ yyreduce:
case 66:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 403 "command.y"
{
if ((yyvsp[(1)  (1)]) != NULL) {
@@ 2104,42 +2104,42 @@ yyreduce:
case 68:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 417 "command.y"
{ (yyval) = NULL; }
break;
case 69:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 422 "command.y"
{ (yyval) = NULL; }
break;
case 74:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 431 "command.y"
{ (yyval) = NULL; }
break;
case 75:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 436 "command.y"
{ (yyval) = NULL; }
break;
case 77:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 439 "command.y"
{ (yyval) = NULL; }
break;
case 78:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 444 "command.y"
{
NODE *n;
@@ 2151,14 +2151,14 @@ yyreduce:
case 79:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 454 "command.y"
{ (yyval) = NULL; }
break;
case 80:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 456 "command.y"
{
if (find_option((yyvsp[(1)  (1)])>a_string) < 0)
@@ 2168,7 +2168,7 @@ yyreduce:
case 81:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 461 "command.y"
{
if (find_option((yyvsp[(1)  (3)])>a_string) < 0)
@@ 2178,7 +2178,7 @@ yyreduce:
case 82:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 469 "command.y"
{
NODE *n;
@@ 2196,56 +2196,56 @@ yyreduce:
case 83:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 485 "command.y"
{ (yyval) = NULL; }
break;
case 88:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 494 "command.y"
{ (yyval) = NULL; }
break;
case 89:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 495 "command.y"
{ want_nodeval = TRUE; }
break;
case 92:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 497 "command.y"
{ want_nodeval = TRUE; }
break;
case 95:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 503 "command.y"
{ (yyval) = NULL; }
break;
case 97:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 509 "command.y"
{ (yyval) = NULL; }
break;
case 99:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 515 "command.y"
{ (yyval) = NULL; }
break;
case 104:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 527 "command.y"
{
int idx = find_argument((yyvsp[(1)  (2)]));
@@ 2262,7 +2262,7 @@ yyreduce:
case 106:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 543 "command.y"
{
(yyvsp[(2)  (2)])>type = D_array; /* dump all items */
@@ 2272,7 +2272,7 @@ yyreduce:
case 107:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 548 "command.y"
{
(yyvsp[(2)  (3)])>type = D_array;
@@ 2282,21 +2282,21 @@ yyreduce:
case 117:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 574 "command.y"
{ (yyval) = NULL; }
break;
case 118:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 576 "command.y"
{ (yyval) = NULL; }
break;
case 119:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 578 "command.y"
{
CMDARG *a;
@@ 2308,7 +2308,7 @@ yyreduce:
case 126:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 594 "command.y"
{
if ((yyvsp[(1)  (3)])>a_int > (yyvsp[(3)  (3)])>a_int)
@@ 2322,28 +2322,28 @@ yyreduce:
case 127:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 606 "command.y"
{ (yyval) = NULL; }
break;
case 134:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 620 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 135:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 622 "command.y"
{ (yyval) = (yyvsp[(1)  (3)]); }
break;
case 137:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 628 "command.y"
{
CMDARG *a;
@@ 2363,21 +2363,21 @@ yyreduce:
case 139:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 647 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); num_dim = 1; }
break;
case 140:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 649 "command.y"
{ (yyval) = (yyvsp[(1)  (2)]); num_dim++; }
break;
case 142:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 655 "command.y"
{
NODE *n = (yyvsp[(2)  (2)])>a_node;
@@ 2391,7 +2391,7 @@ yyreduce:
case 143:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 664 "command.y"
{
/* a_string is array name, a_count is dimension count */
@@ 2403,14 +2403,14 @@ yyreduce:
case 144:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 674 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 145:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 676 "command.y"
{
NODE *n = (yyvsp[(2)  (2)])>a_node;
@@ 2422,7 +2422,7 @@ yyreduce:
case 146:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 683 "command.y"
{
NODE *n = (yyvsp[(2)  (2)])>a_node;
@@ 2436,35 +2436,35 @@ yyreduce:
case 147:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 695 "command.y"
{ (yyval) = NULL; }
break;
case 148:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 697 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 149:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 702 "command.y"
{ (yyval) = NULL; }
break;
case 150:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 704 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 151:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 709 "command.y"
{
if ((yyvsp[(1)  (1)])>a_int == 0)
@@ 2475,7 +2475,7 @@ yyreduce:
case 152:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 715 "command.y"
{
if ((yyvsp[(2)  (2)])>a_int == 0)
@@ 2486,21 +2486,21 @@ yyreduce:
case 153:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 724 "command.y"
{ (yyval) = (yyvsp[(1)  (1)]); }
break;
case 154:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 726 "command.y"
{ (yyval) = (yyvsp[(2)  (2)]); }
break;
case 155:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 728 "command.y"
{
(yyvsp[(2)  (2)])>a_int =  (yyvsp[(2)  (2)])>a_int;
@@ 2510,7 +2510,7 @@ yyreduce:
case 156:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 736 "command.y"
{
if (lexptr_begin != NULL) {
@@ 2524,7 +2524,7 @@ yyreduce:
/* Line 1821 of yacc.c */
+/* Line 1806 of yacc.c */
#line 2541 "command.c"
default: break;
}
diff git a/doc/ChangeLog b/doc/ChangeLog
index 58426fb..735ee49 100644
 a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ 1,3 +1,7 @@
+20120408 Arnold D. Robbins <address@hidden>
+
+ * gawk.texi: Editing on new chapter on arbitrary precision numbers.
+
20120331 John Haque <address@hidden>
* gawk.texi, gawk.1: Add text on support for arbitrary precision
diff git a/doc/gawk.info b/doc/gawk.info
index 8b36543..6c94a6a 100644
 a/doc/gawk.info
+++ b/doc/gawk.info
@@ 1,4 +1,4 @@
This is gawk.info, produced by makeinfo version 4.8 from gawk.texi.
+This is gawk.info, produced by makeinfo version 4.13 from gawk.texi.
INFODIRSECTION Text creation and manipulation
STARTINFODIRENTRY
@@ 89,7 +89,8 @@ texts being (a) (see below), and with the BackCover Texts
being (b)
* Functions:: Builtin and userdefined functions.
* Internationalization:: Getting `gawk' to speak your
language.
* Arbitrary Precision Arithmetic:: Arbitrary precision arithmetic with `gawk'.
+* Arbitrary Precision Arithmetic:: Arbitrary precision arithmetic with
+ `gawk'.
* Advanced Features:: Stuff for advanced users, specific to
`gawk'.
* Library Functions:: A Library of `awk' Functions.
@@ 759,7 +760,7 @@ A Rose by Any Other Name
========================
The `awk' language has evolved over the years. Full details are
provided in *Note Language History::. The language described in this
+provided in *note Language History::. The language described in this
Info file is often referred to as "new `awk'" (`nawk').
Because of this, there are systems with multiple versions of `awk'.
@@ 820,78 +821,78 @@ illustrates the concept currently being described.
While this Info file is aimed principally at people who have not been
exposed to `awk', there is a lot of information here that even the `awk'
expert should find useful. In particular, the description of POSIX
`awk' and the example programs in *Note Library Functions::, and in
*Note Sample Programs::, should be of interest.
+`awk' and the example programs in *note Library Functions::, and in
+*note Sample Programs::, should be of interest.
 *Note Getting Started::, provides the essentials you need to know to
+ *note Getting Started::, provides the essentials you need to know to
begin using `awk'.
 *Note Invoking Gawk::, describes how to run `gawk', the meaning of
+ *note Invoking Gawk::, describes how to run `gawk', the meaning of
its commandline options, and how it finds `awk' program source files.
 *Note Regexp::, introduces regular expressions in general, and in
+ *note Regexp::, introduces regular expressions in general, and in
particular the flavors supported by POSIX `awk' and `gawk'.
 *Note Reading Files::, describes how `awk' reads your data. It
+ *note Reading Files::, describes how `awk' reads your data. It
introduces the concepts of records and fields, as well as the `getline'
command. I/O redirection is first described here. Network I/O is also
briefly introduced here.
 *Note Printing::, describes how `awk' programs can produce output
+ *note Printing::, describes how `awk' programs can produce output
with `print' and `printf'.
 *Note Expressions::, describes expressions, which are the basic
+ *note Expressions::, describes expressions, which are the basic
building blocks for getting most things done in a program.
 *Note Patterns and Actions::, describes how to write patterns for
+ *note Patterns and Actions::, describes how to write patterns for
matching records, actions for doing something when a record is matched,
and the builtin variables `awk' and `gawk' use.
 *Note Arrays::, covers `awk''s oneandonly data structure:
+ *note Arrays::, covers `awk''s oneandonly data structure:
associative arrays. Deleting array elements and whole arrays is also
described, as well as sorting arrays in `gawk'. It also describes how
`gawk' provides arrays of arrays.
 *Note Functions::, describes the builtin functions `awk' and `gawk'
+ *note Functions::, describes the builtin functions `awk' and `gawk'
provide, as well as how to define your own functions.
 *Note Internationalization::, describes special features in `gawk'
+ *note Internationalization::, describes special features in `gawk'
for translating program messages into different languages at runtime.
 *Note Advanced Features::, describes a number of `gawk'specific
+ *note Advanced Features::, describes a number of `gawk'specific
advanced features. Of particular note are the abilities to have
twoway communications with another process, perform TCP/IP networking,
and profile your `awk' programs.
 *Note Library Functions::, and *Note Sample Programs::, provide many
+ *note Library Functions::, and *note Sample Programs::, provide many
sample `awk' programs. Reading them allows you to see `awk' solving
real problems.
 *Note Debugger::, describes the `awk' debugger.
+ *note Debugger::, describes the `awk' debugger.
 *Note Language History::, describes how the `awk' language has
+ *note Language History::, describes how the `awk' language has
evolved since its first release to present. It also describes how
`gawk' has acquired features over time.
 *Note Installation::, describes how to get `gawk', how to compile it
+ *note Installation::, describes how to get `gawk', how to compile it
on POSIXcompatible systems, and how to compile and use it on different
nonPOSIX systems. It also describes how to report bugs in `gawk' and
where to get other freely available `awk' implementations.
 *Note Notes::, describes how to disable `gawk''s extensions, as well
+ *note Notes::, describes how to disable `gawk''s extensions, as well
as how to contribute new code to `gawk', how to write extension
libraries, and some possible future directions for `gawk' development.
 *Note Basic Concepts::, provides some very cursory background
+ *note Basic Concepts::, provides some very cursory background
material for those who are completely unfamiliar with computer
programming. Also centralized there is a discussion of some of the
issues surrounding floatingpoint numbers.
 The *Note Glossary::, defines most, if not all, the significant
+ The *note Glossary::, defines most, if not all, the significant
terms used throughout the book. If you find terms that you aren't
familiar with, try looking them up here.
 *Note Copying::, and *Note GNU Free Documentation License::, present
+ *note Copying::, and *note GNU Free Documentation License::, present
the licenses that cover the `gawk' source code and this Info file,
respectively.
@@ 1007,7 +1008,7 @@ Guide'.
This edition maintains the basic structure of the previous editions.
For Edition 4.0, the content has been thoroughly reviewed and updated.
All references to versions prior to 4.0 have been removed. Of
significant note for this edition is *Note Debugger::.
+significant note for this edition is *note Debugger::.
`GAWK: Effective AWK Programming' will undoubtedly continue to
evolve. An electronic version comes with the `gawk' distribution from
@@ 1019,7 +1020,7 @@ electronically.
(1) GNU stands for "GNU's not Unix."
 (2) The terminology "GNU/Linux" is explained in the *Note Glossary::.
+ (2) The terminology "GNU/Linux" is explained in the *note Glossary::.
File: gawk.info, Node: How To Contribute, Next: Acknowledgments, Prev:
Manual History, Up: Preface
@@ 1118,10 +1119,12 @@ it is today. It has been and continues to be a
pleasure working with
this team of fine people.
John Haque contributed the modifications to convert `gawk' into a
bytecode interpreter, including the debugger. Stephen Davies
contributed to the effort to bring the bytecode changes into the
mainstream code base. Efraim Yawitz contributed the initial text of
*Note Debugger::.
+bytecode interpreter, including the debugger, and the additional
+modifications for support of arbitrary precision arithmetic. Stephen
+Davies contributed to the effort to bring the bytecode changes into
+the mainstream code base. Efraim Yawitz contributed the initial text
+of *note Debugger::. John Haque contributed the initial text of *note
+Arbitrary Precision Arithmetic::.
I would like to thank Brian Kernighan for invaluable assistance
during the testing and debugging of `gawk', and for ongoing help and
@@ 1255,7 +1258,7 @@ programs from shell scripts, because it avoids the need
for a separate
file for the `awk' program. A selfcontained shell script is more
reliable because there are no other files to misplace.
 *Note Very Simple::, presents several short, selfcontained programs.
+ *note Very Simple::, presents several short, selfcontained programs.
File: gawk.info, Node: Read Terminal, Next: Long, Prev: Oneshot, Up:
Running gawk
@@ 1440,7 +1443,7 @@ programs, but this usually isn't very useful; the purpose
of a comment
is to help you or another person understand the program when reading it
at a later time.
 CAUTION: As mentioned in *Note Oneshot::, you can enclose small
+ CAUTION: As mentioned in *note Oneshot::, you can enclose small
to medium programs in single quotes, in order to keep your shell
scripts selfcontained. When doing so, _don't_ put an apostrophe
(i.e., a single quote) into a comment (or anywhere else in your
@@ 1502,7 +1505,7 @@ Shell). If you use the C shell, you're on your own.
quotes. The shell does no interpretation of the quoted text,
passing it on verbatim to the command. It is _impossible_ to
embed a single quote inside singlequoted text. Refer back to
 *Note Comments::, for an example of what happens if you try.
+ *note Comments::, for an example of what happens if you try.
* Double quotes protect most things between the opening and closing
quotes. The shell does at least variable and command substitution
@@ 1514,7 +1517,7 @@ Shell). If you use the C shell, you're on your own.
the characters `$', ``', `\', and `"', all of which must be
preceded by a backslash within doublequoted text if they are to
be passed on literally to the program. (The leading backslash is
 stripped first.) Thus, the example seen in *Note Read Terminal::,
+ stripped first.) Thus, the example seen in *note Read Terminal::,
is applicable:
$ awk "BEGIN { print \"Don't Panic!\" }"
@@ 1669,7 +1672,7 @@ Miscellaneous File Operations: (emacs)Misc File Ops, for
more
information). Using this information, create your own `BBSlist' and
`inventoryshipped' files and practice what you learn in this Info file.
 If you are using the standalone version of Info, see *Note Extract
+ If you are using the standalone version of Info, see *note Extract
Program::, for an `awk' program that extracts these data files from
`gawk.texi', the Texinfo source file for this Info file.
@@ 2011,7 +2014,7 @@ minor node could also be written this way:
 Footnotes 
(1) The `?' and `:' referred to here is the threeoperand
conditional expression described in *Note Conditional Exp::. Splitting
+conditional expression described in *note Conditional Exp::. Splitting
lines after `?' and `:' is a minor `gawk' extension; if `posix' is
specified (*note Options::), then this extension is disabled.
@@ 2034,7 +2037,7 @@ determining the type of a variable, and array sorting.
As we develop our presentation of the `awk' language, we introduce
most of the variables and many of the functions. They are described
systematically in *Note Builtin Variables::, and *Note Builtin::.
+systematically in *note Builtin Variables::, and *note Builtin::.
File: gawk.info, Node: When, Prev: Other Features, Up: Getting Started
@@ 2192,7 +2195,7 @@ The following list describes options mandated by the
POSIX standard:
This is useful if you have file names that start with `', or in
shell scripts, if you have file names that will be specified by
the user that could start with `'. It is also useful for passing
 options on to the `awk' program; see *Note Getopt Function::.
+ options on to the `awk' program; see *note Getopt Function::.
The following list describes `gawk'specific options:
@@ 2211,7 +2214,7 @@ The following list describes options mandated by the
POSIX standard:
Specify "compatibility mode", in which the GNU extensions to the
`awk' language are disabled, so that `gawk' behaves just like
Brian Kernighan's version `awk'. *Note POSIX/GNU::, which
 summarizes the extensions. Also see *Note Compatibility Mode::.
+ summarizes the extensions. Also see *note Compatibility Mode::.
`C'
`copyright'
@@ 2423,7 +2426,7 @@ if they had been concatenated together into one big file.
This is
useful for creating libraries of `awk' functions. These functions can
be written once and then retrieved from a standard place, instead of
having to be included into each individual program. (As mentioned in
*Note Definition Syntax::, function names must be unique.)
+*note Definition Syntax::, function names must be unique.)
With standard `awk', library functions can still be used, even if
the program is entered at the terminal, by specifying `f /dev/tty'.
@@ 2481,7 +2484,7 @@ File: gawk.info, Node: Other Arguments, Next: Naming
Standard Input, Prev: Op
Any additional arguments on the command line are normally treated as
input files to be processed in the order specified. However, an
argument that has the form `VAR=VALUE', assigns the value VALUE to the
variable VARit does not specify a file at all. (See *Note Assignment
+variable VARit does not specify a file at all. (See *note Assignment
Options::.)
All these arguments are made available to your `awk' program in the
@@ 2801,7 +2804,7 @@ reducing the need for writing complex and tedious command
lines. In
particular, address@hidden' is very useful for writing CGI scripts to be run
from web pages.
 As mentioned in *Note AWKPATH Variable::, the current directory is
+ As mentioned in *note AWKPATH Variable::, the current directory is
always searched first for source files, before searching in `AWKPATH',
and this also applies to files named with address@hidden'.
@@ 2819,7 +2822,7 @@ they will _not_ be in the next release).
The processrelated special files `/dev/pid', `/dev/ppid',
`/dev/pgrpid', and `/dev/user' were deprecated in `gawk' 3.1, but still
worked. As of version 4.0, they are no longer interpreted specially by
`gawk'. (Use `PROCINFO' instead; see *Note Autoset::.)
+`gawk'. (Use `PROCINFO' instead; see *note Autoset::.)
File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk
@@ 3012,7 +3015,7 @@ with a backslash have special meaning in regexps. *Note
GNU Regexp
Operators::.
In a regexp, a backslash before any character that is not in the
previous list and not listed in *Note GNU Regexp Operators::, means
+previous list and not listed in *note GNU Regexp Operators::, means
that the next character should be taken literally, even if it would
normally be a regexp operator. For example, `/a\+b/' matches the three
characters `a+b'.
@@ 3027,7 +3030,7 @@ character not shown in the previous list.
early, as soon as `awk' reads your program.
* `gawk' processes both regexp constants and dynamic regexps (*note
 Computed Regexps::), for the special operators listed in *Note GNU
+ Computed Regexps::), for the special operators listed in *note GNU
Regexp Operators::.
* A backslash before any other character means to treat that
@@ 3056,7 +3059,7 @@ Advanced Notes: Escape Sequences for Metacharacters

Suppose you use an octal or hexadecimal escape to represent a regexp
metacharacter. (See *Note Regexp Operators::.) Does `awk' treat the
+metacharacter. (See *note Regexp Operators::.) Does `awk' treat the
character as a literal character or as a regexp operator?
Historically, such characters were taken literally. (d.c.)
@@ 3076,7 +3079,7 @@ You can combine regular expressions with special
characters, called
"regular expression operators" or "metacharacters", to increase the
power and versatility of regular expressions.
 The escape sequences described in *Note Escape Sequences::, are
+ The escape sequences described in *note Escape Sequences::, are
valid inside a regexp. They are introduced by a `\' and are recognized
and converted into corresponding real characters as the very first step
in processing regexps.
@@ 3126,7 +3129,7 @@ sequences and that are not listed in the table stand for
themselves:
the characters that are enclosed in the square brackets. For
example, `[MVX]' matches any one of the characters `M', `V', or
`X' in a string. A full discussion of what can be inside the
 square brackets of a bracket expression is given in *Note Bracket
+ square brackets of a bracket expression is given in *note Bracket
Expressions::.
`[^ ...]'
@@ 3253,7 +3256,7 @@ those listed between the opening and closing square
brackets.
characters separated by a hyphen. It matches any single character that
sorts between the two characters, based upon the system's native
character set. For example, `[09]' is equivalent to `[0123456789]'.
(See *Note Ranges and Locales::, for an explanation of how the POSIX
+(See *note Ranges and Locales::, for an explanation of how the POSIX
standard and `gawk' have changed over time. This is mainly of
historical interest.)
@@ 3279,7 +3282,7 @@ differs between the United States and France.
A character class is only valid in a regexp _inside_ the brackets of
a bracket expression. Character classes consist of `[:', a keyword
denoting the class, and `:]'. *Note tablecharclasses:: lists the
+denoting the class, and `:]'. *note tablecharclasses:: lists the
character classes defined by the POSIX standard.
Class Meaning
@@ 3410,7 +3413,7 @@ GNU `\b' appears to be the lesser of two evils.
No options
In the default case, `gawk' provides all the facilities of POSIX
 regexps and the GNU regexp operators described in *Note Regexp
+ regexps and the GNU regexp operators described in *note Regexp
Operators::.
`posix'
@@ 3963,7 +3966,7 @@ that the multiplication is done before the `$' operation;
they are
necessary whenever there is a binary operator in the fieldnumber
expression. This example, then, prints the hours of operation (the
fourth field) for every line of the file `BBSlist'. (All of the `awk'
operators are listed, in order of decreasing precedence, in *Note
+operators are listed, in order of decreasing precedence, in *note
Precedence::.)
If the field number you compute is zero, you get the entire record.
@@ 3973,7 +3976,7 @@ not allowed; trying to reference one usually terminates
the program.
negative field number. `gawk' notices this and terminates your
program. Other `awk' implementations may behave differently.)
 As mentioned in *Note Fields::, `awk' stores the current record's
+ As mentioned in *note Fields::, `awk' stores the current record's
number of fields in the builtin variable `NF' (also *note Builtin
Variables::). The expression `$NF' is not a special featureit is the
direct consequence of evaluating `NF' and using its value as a field
@@ 5234,7 +5237,7 @@ in mind:
probably by accident, and you should reconsider what it is you're
trying to accomplish.
 * *Note Getline Summary::, presents a table summarizing the
+ * *note Getline Summary::, presents a table summarizing the
`getline' variants and which variables they can affect. It is
worth noting that those variants which do not use redirection can
cause `FILENAME' to be updated if they cause `awk' to start
@@ 5246,7 +5249,7 @@ File: gawk.info, Node: Getline Summary, Prev: Getline
Notes, Up: Getline
4.9.10 Summary of `getline' Variants

*Note tablegetlinevariants:: summarizes the eight variants of
+*note tablegetlinevariants:: summarizes the eight variants of
`getline', listing which builtin variables are set by each one, and
whether the variant is standard or a `gawk' extension.
@@ 5386,7 +5389,7 @@ and the `printf' statement for fancier formatting. The
`print'
statement is not limited when computing _which_ values to print.
However, with two exceptions, you cannot specify _how_ to print
themhow many columns, whether to use exponential notation or not, and
so on. (For the exceptions, *note Output Separators::, and *Note
+so on. (For the exceptions, *note Output Separators::, and *note
OFMT::.) For printing with specifications, you need the `printf'
statement (*note Printf::).
@@ 5573,7 +5576,7 @@ that string. `awk' uses the `sprintf()' function to do
this conversion
`sprintf()' function accepts a "format specification" that tells it how
to format numbers (or strings), and that there are a number of
different ways in which numbers can be formatted. The different format
specifications are discussed more fully in *Note Control Letters::.
+specifications are discussed more fully in *note Control Letters::.
The builtin variable `OFMT' contains the default format
specification that `print' uses with `sprintf()' when it wants to
@@ 5623,8 +5626,8 @@ A simple `printf' statement looks like this:
printf FORMAT, ITEM1, ITEM2, ...
The entire list of arguments may optionally be enclosed in parentheses.
The parentheses are necessary if any of the item expressions use the
`>' relational operator; otherwise, it can be confused with an output
+The parentheses are necessary if any of the item expressions use the `>'
+relational operator; otherwise, it can be confused with an output
redirection (*note Redirection::).
The difference between `printf' and `print' is the FORMAT argument.
@@ 5830,12 +5833,12 @@ which they may appear:
 1,234,567 Results in US English UTF locale
For more information about locales and internationalization issues,
 see *Note Locales::.
+ see *note Locales::.
NOTE: The `'' flag is a nice feature, but its use complicates
things: it becomes difficult to use it in commandline
programs. For information on appropriate quoting tricks, see
 *Note Quoting::.
+ *note Quoting::.
`WIDTH'
This is a number specifying the desired minimum width of a field.
@@ 6076,7 +6079,7 @@ work identically for `printf':
The message is built using string concatenation and saved in the
variable `m'. It's then sent down the pipeline to the `mail'
program. (The parentheses group the items to concatenatesee
 *Note Concatenation::.)
+ *note Concatenation::.)
The `close()' function is called here because it's a good idea to
close the pipe as soon as all the intended output has been sent to
@@ 6261,7 +6264,7 @@ essential pieces of information for making a networking
connection.
These file names are used with the `&' operator for communicating with
a coprocess (*note Twoway I/O::). This is an advanced feature,
mentioned here only for completeness. Full discussion is delayed until
*Note TCP/IP Networking::.
+*note TCP/IP Networking::.
File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special
Files
@@ 6408,7 +6411,7 @@ to `close()'. As in any other call to `close()', the
first argument is
the name of the command or special file used to start the coprocess.
The second argument should be a string, with either of the values
`"to"' or `"from"'. Case does not matter. As this is an advanced
feature, a more complete discussion is delayed until *Note Twoway
+feature, a more complete discussion is delayed until *note Twoway
I/O::, which discusses it in more detail and gives an example.
Advanced Notes: Using `close()''s Return Value
@@ 6597,7 +6600,7 @@ option; *note Nondecimal Data::.) If you have octal or
hexadecimal
data, you can use the `strtonum()' function (*note String Functions::)
to convert the data into a number. Most of the time, you will want to
use octal or hexadecimal constants when working with the builtin bit
manipulation functions; see *Note Bitwise Functions::, for more
+manipulation functions; see *note Bitwise Functions::, for more
information.
Unlike some early C implementations, `8' and `9' are not valid in
@@ 6880,7 +6883,7 @@ your programs, just port `gawk' itself. *Note Print::,
for more
information on the `print' statement.
And, once again, where you are can matter when it comes to converting
between numbers and strings. In *Note Locales::, we mentioned that the
+between numbers and strings. In *note Locales::, we mentioned that the
local character set and language (the locale) can affect how `gawk'
matches characters. The locale also affects numeric formats. In
particular, for `awk' programs, it affects the decimal point character.
@@ 6921,7 +6924,7 @@ character. (`gawk' also uses the locale's decimal point
character when
in POSIX mode, either via `posix', or the `POSIXLY_CORRECT'
environment variable.)
 *Note tablelocaleaffects:: describes the cases in which the
+ *note tablelocaleaffects:: describes the cases in which the
locale's decimal point character is used and when a period is used.
Some of these features have not been described yet.
@@ 6937,7 +6940,7 @@ Table 6.1: Locale Decimal Point versus A Period
Finally, modern day formal standards and IEEE standard floating point
representation can have an unusual but important effect on the way
`gawk' converts some special string values to numbers. The details are
presented in *Note POSIX Floating Point Problems::.
+presented in *note POSIX Floating Point Problems::.
 Footnotes 
@@ 7248,7 +7251,7 @@ righthand expression. For example:
The indices of `bar' are practically guaranteed to be different, because
`rand()' returns different values each time it is called. (Arrays and
the `rand()' function haven't been covered yet. *Note Arrays::, and
see *Note Numeric Functions::, for more information). This example
+see *note Numeric Functions::, for more information). This example
illustrates an important fact about assignment operators: the lefthand
expression is only evaluated _once_. It is up to the implementation as
to which expression is evaluated first, the lefthand or the righthand.
@@ 7259,7 +7262,7 @@ Consider this example:
The value of `a[3]' could be either two or four.
 *Note tableassignops:: lists the arithmetic assignment operators.
+ *note tableassignops:: lists the arithmetic assignment operators.
In each case, the righthand operand is an expression whose value is
converted to a number.
@@ 7297,7 +7300,7 @@ A workaround is:
awk '/[=]=/' /dev/null
`gawk' does not have this problem, nor do the other freely available
versions described in *Note Other Versions::.
+versions described in *note Other Versions::.
File: gawk.info, Node: Increment Ops, Prev: Assignment Ops, Up: All
Operators
@@ 7562,7 +7565,7 @@ File: gawk.info, Node: Comparison Operators, Next:
POSIX String Comparison, P
"Comparison expressions" compare strings or numbers for relationships
such as equality. They are written using "relational operators", which
are a superset of those in C. *Note tablerelationalops:: describes
+are a superset of those in C. *note tablerelationalops:: describes
them.
Expression Result
@@ 7738,8 +7741,8 @@ Boolean operators are:
if ($0 ~ /2400/  $0 ~ /foo/) print
The subexpression BOOLEAN2 is evaluated only if BOOLEAN1 is false.
 This can make a difference when BOOLEAN2 contains expressions
 that have side effects.
+ This can make a difference when BOOLEAN2 contains expressions that
+ have side effects.
`! BOOLEAN'
True if BOOLEAN is false. For example, the following program
@@ 7749,7 +7752,7 @@ Boolean operators are:
BEGIN { if (! ("HOME" in ENVIRON))
print "no home!" }
 (The `in' operator is described in *Note Reference to Elements::.)
+ (The `in' operator is described in *note Reference to Elements::.)
The `&&' and `' operators are called "shortcircuit" operators
because of the way they work. Evaluation of the full expression is
@@ 7779,7 +7782,7 @@ using `!'. The next rule prints lines as long as
`interested' is true.
When a line is seen whose first field is `END', `interested' is toggled
back to false.(1)
 NOTE: The `next' statement is discussed in *Note Next Statement::.
+ NOTE: The `next' statement is discussed in *note Next Statement::.
`next' tells `awk' to skip the rest of the rules, get the next
record, and start processing the rules over again at the top. The
reason it's there is to avoid printing the bracketing `START' and
@@ 7882,7 +7885,7 @@ Userdefined::).
As an advanced feature, `gawk' provides indirect function calls,
which is a way to choose the function to call at runtime, instead of
when you write the source code to your program. We defer discussion of
this feature until later; see *Note Indirect Calls::.
+this feature until later; see *note Indirect Calls::.
Like every other expression, the function call has a value, which is
computed by the function based on the arguments you give it. In this
@@ 8042,12 +8045,12 @@ make several function calls, _per input character_, to
find the record
terminator.
According to POSIX, string comparison is also affected by locales
(similar to regular expressions). The details are presented in *Note
+(similar to regular expressions). The details are presented in *note
POSIX String Comparison::.
Finally, the locale affects the value of the decimal point character
used when `gawk' parses input data. This is discussed in detail in
*Note Conversion::.
+*note Conversion::.
File: gawk.info, Node: Patterns and Actions, Next: Arrays, Prev:
Expressions, Up: Top
@@ 8148,7 +8151,7 @@ otherwise, it depends on only what has happened so far in
the execution
of the `awk' program.
Comparison expressions, using the comparison operators described in
*Note Typing and Comparison::, are a very common kind of pattern.
+*note Typing and Comparison::, are a very common kind of pattern.
Regexp matching and nonmatching are also very common expressions. The
left operand of the `~' and `!~' operators is a string. The right
operand is either a constant regular expression enclosed in slashes
@@ 8214,7 +8217,7 @@ inside Boolean patterns. Likewise, the special patterns
`BEGIN', `END',
expressions and cannot appear inside Boolean patterns.
The precedence of the different operators which can appear in
patterns is described in *Note Precedence::.
+patterns is described in *note Precedence::.
File: gawk.info, Node: Ranges, Next: BEGIN/END, Prev: Expression Patterns,
Up: Pattern Overview
@@ 8400,7 +8403,7 @@ explicitly.
`BEGIN' rule, because the implicit
readarecordandmatchagainsttherules loop has not started yet.
Similarly, those statements are not valid in an `END' rule, since all
the input has been read. (*Note Next Statement::, and see *Note
+the input has been read. (*Note Next Statement::, and see *note
Nextfile Statement::.)
@@ 8939,7 +8942,7 @@ Statement::.)
}
The `break' statement is also used to break out of the `switch'
statement. This is discussed in *Note Switch Statement::.
+statement. This is discussed in *note Switch Statement::.
The `break' statement has no meaning when used outside the body of a
loop or `switch'. However, although it was never documented,
@@ 9036,7 +9039,7 @@ beginning, in the following manner:
Because of the `next' statement, the program's subsequent rules won't
see the bad record. The error message is redirected to the standard
error output stream, as error messages should be. For more detail see
*Note Special Files::.
+*note Special Files::.
If the `next' statement causes the end of the input to be reached,
then the code in any `END' rules is executed. *Note BEGIN/END::.
@@ 9207,7 +9210,7 @@ specific to `gawk' are marked with a pound sign (`#').
string value of `"rw"' or `"wr"' indicates that all files should
use binary I/O. Any other string value is treated the same as
`"rw"', but causes `gawk' to generate a warning message.
 `BINMODE' is described in more detail in *Note PC Using::.
+ `BINMODE' is described in more detail in *note PC Using::.
This variable is a `gawk' extension. In other `awk'
implementations (except `mawk', *note Other Versions::), or if
@@ 9322,12 +9325,12 @@ specific to `gawk' are marked with a pound sign (`#').
`PREC #'
The working precision of arbitrary precision floatingpoint
 numbers, 53 by default. (*Note Setting Precision::.)
+ numbers, 53 by default (*note Setting Precision::).
`RNDMODE #'
The rounding mode to use for arbitrary precision arithmetic on
 numbers, by default `"N"' (`roundTiesToEven' in IEEE754 standard).
 (*Note Setting Rounding Mode::.)
+ numbers, by default `"N"' (`roundTiesToEven' in the IEEE754
+ standard) (*note Setting Rounding Mode::).
`RS'
This is `awk''s input record separator. Its default value is a
@@ 9520,7 +9523,7 @@ with a pound sign (`#').
If this element exists in `PROCINFO', its value controls the
order in which array indices will be processed by `for (index
in array) ...' loops. Since this is an advanced feature, we
 defer the full description until later; see *Note Scanning an
+ defer the full description until later; see *note Scanning an
Array::.
`PROCINFO["strftime"]'
@@ 9558,7 +9561,7 @@ with a pound sign (`#').
The `PROCINFO' array is also used to cause coprocesses to
communicate over pseudottys instead of through twoway pipes;
 this is discussed further in *Note Twoway I/O::.
+ this is discussed further in *note Twoway I/O::.
This array is a `gawk' extension. In other `awk' implementations,
or if `gawk' is in compatibility mode (*note Options::), it is not
@@ 9620,7 +9623,7 @@ File: gawk.info, Node: ARGC and ARGV, Prev: Autoset,
Up: Builtin Variables
7.5.3 Using `ARGC' and `ARGV'

*Note Autoset::, presented the following program describing the
+*note Autoset::, presented the following program describing the
information contained in `ARGC' and `ARGV':
$ awk 'BEGIN {
@@ 9676,7 +9679,7 @@ elements from `ARGV' (*note Delete::).
All of these actions are typically done in the `BEGIN' rule, before
actual processing of the input begins. *Note Split Program::, and see
*Note Tee Program::, for examples of each way of removing elements from
+*note Tee Program::, for examples of each way of removing elements from
`ARGV'. The following fragment processes `ARGV' in order to examine,
and then remove, commandline options:
@@ 9858,7 +9861,7 @@ from English to French:
Here we decided to translate the number one in both spelledout and
numeric formthus illustrating that a single array can have both
numbers and strings as indices. In fact, array subscripts are always
strings; this is discussed in more detail in *Note Numeric Array
+strings; this is discussed in more detail in *note Numeric Array
Subscripts::. Here, the number `1' isn't doublequoted, since `awk'
automatically converts it to a string.
@@ 10078,7 +10081,7 @@ internal implementation of arrays and will vary from
one version of
* Set `PROCINFO["sorted_in"]' to the name of a userdefined function
to be used for comparison of array elements. This advanced feature
 is described later, in *Note Array Sorting::.
+ is described later, in *note Array Sorting::.
The following special values for `PROCINFO["sorted_in"]' are
available:
@@ 10188,7 +10191,7 @@ traversal.
*note Delete::.)
In addition, `gawk' provides builtin functions for sorting arrays;
see *Note Array Sorting Functions::.
+see *note Array Sorting Functions::.
 Footnotes 
@@ 10898,7 +10901,7 @@ pound sign (`#'):
asort(a, a, "descending")
 The `asort()' function is described in more detail in *Note Array
+ The `asort()' function is described in more detail in *note Array
Sorting Functions::. `asort()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ 10907,7 +10910,7 @@ pound sign (`#'):
similarly to `asort()', however, the _indices_ are sorted, instead
of the values. (Here too, `IGNORECASE' affects the sorting.)
 The `asorti()' function is described in more detail in *Note Array
+ The `asorti()' function is described in more detail in *note Array
Sorting Functions::. `asorti()' is a `gawk' extension; it is not
available in compatibility mode (*note Options::).
@@ 11390,7 +11393,7 @@ replacement string to determine what to generate.
At both levels, `awk' looks for a defined set of characters that can
come after a backslash. At the lexical level, it looks for the escape
sequences listed in *Note Escape Sequences::. Thus, for every `\' that
+sequences listed in *note Escape Sequences::. Thus, for every `\' that
`awk' processes at the runtime level, you must type two backslashes at
the lexical level. When a character that is not valid for an escape
sequence follows the `\', Brian Kernighan's `awk' and `gawk' both
@@ 11403,7 +11406,7 @@ Historically, the `sub()' and `gsub()' functions
treated the two
character sequence `\&' specially; this sequence was replaced in the
generated text with a single `&'. Any other `\' within the REPLACEMENT
string that did not precede an `&' was passed through unchanged. This
is illustrated in *Note tablesubescapes::.
+is illustrated in *note tablesubescapes::.
You type `sub()' sees `sub()' generates
  
@@ 11415,7 +11418,8 @@ is illustrated in *Note tablesubescapes::.
`\\\\\\&' `\\\&' a literal `\\&'
`\\q' `\q' a literal `\q'
Table 9.1: Historical Escape Sequence Processing for `sub()' and `gsub()'
+Table 9.1: Historical Escape Sequence Processing for `sub()' and
+`gsub()'
This table shows both the lexicallevel processing, where an odd number
of backslashes becomes an even number at the runtime level, as well as
@@ 11430,7 +11434,7 @@ get a literal `\' followed by the matched text.
says that `sub()' and `gsub()' look for either a `\' or an `&' after
the `\'. If either one follows a `\', that character is output
literally. The interpretation of `\' and `&' then becomes as shown in
*Note tablesubposix92::.
+*note tablesubposix92::.
You type `sub()' sees `sub()' generates
  
@@ 11457,7 +11461,7 @@ problems:
submitted proposed text for a revised standard that reverts to rules
that correspond more closely to the original existing practice. The
proposed rules have special cases that make it possible to produce a
`\' preceding the matched text. This is shown in *Note
+`\' preceding the matched text. This is shown in *note
tablesubproposed::.
You type `sub()' sees `sub()' generates
@@ 11485,7 +11489,7 @@ except for one case.
The POSIX rules state that `\&' in the replacement string produces a
literal `&', `\\' produces a literal `\', and `\' followed by anything
else is not special; the `\' is placed straight into the output. These
rules are presented in *Note tableposixsub::.
+rules are presented in *note tableposixsub::.
You type `sub()' sees `sub()' generates
  
@@ 11516,7 +11520,7 @@ level, whenever `gawk' sees a `\', if the following
character is a
digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise, no matter
what character follows the `\', it appears in the generated text and
the `\' does not, as shown in *Note tablegensubescapes::.
+the `\' does not, as shown in *note tablegensubescapes::.
You type `gensub()' sees `gensub()' generates
  
@@ 12045,7 +12049,7 @@ supports all of the conversions listed here.
(5) If you don't understand any of this, don't worry about it; these
facilities are meant to make it easier to "internationalize" programs.
Other internationalization features are described in *Note
+Other internationalization features are described in *note
Internationalization::.
(6) This is because ISO C leaves the behavior of the C version of
@@ 12065,7 +12069,7 @@ File: gawk.info, Node: Bitwise Functions, Next: Type
Functions, Prev: Time Fu
Many languages provide the ability to perform "bitwise" operations
on two integer numbers. In other words, the operation is performed on
each successive pair of bits in the operands. Three common operations
are bitwise AND, OR, and XOR. The operations are described in *Note
+are bitwise AND, OR, and XOR. The operations are described in *note
tablebitwiseops::.
Bit Operator
@@ 12333,7 +12337,7 @@ act of a function calling itself is called "recursion".
All the builtin functions return a value to their caller.
Userdefined functions can do also, using the `return' statement, which
is described in detail in *Note Return Statement::. Many of the
+is described in detail in *note Return Statement::. Many of the
subsequent examples in this minor node use the `return' statement.
In many `awk' implementations, including `gawk', the keyword
@@ 13266,7 +13270,7 @@ internationalization:
`"LC_MESSAGES"'.
If you supply a value for CATEGORY, it must be a string equal to
 one of the known locale categories described in *Note Explaining
+ one of the known locale categories described in *note Explaining
gettext::. You must also supply a text domain. Use `TEXTDOMAIN'
if you want to use the current domain.
@@ 13298,7 +13302,7 @@ internationalization:
current binding for the given DOMAIN.
To use these facilities in your `awk' program, follow the steps
outlined in *Note Explaining gettext::, like so:
+outlined in *note Explaining gettext::, like so:
1. Set the variable `TEXTDOMAIN' to the text domain of your program.
This is best done in a `BEGIN' rule (*note BEGIN/END::), or it can
@@ 13653,26 +13657,27 @@ File: gawk.info, Node: Arbitrary Precision
Arithmetic, Next: Advanced Features
authority; they tend to believe that all digits of a printed
answer are significant. Disillusioned computer users have just the
opposite approach; they are constantly afraid that their answers
 are almost meaningless.(1)
+ are almost meaningless.
 Donald Knuth
+ Donald Knuth(1)
 This section is about how to use the arbitrary precision (also known
as multiple precision or infinite precision) numeric capabilites in
`gawk' to produce maximally accurate results when you need it. But
first you should check if your version of `gawk' supports arbitrary
precision arithmetic. The easiest way to find out is to look at the
output of the following command:
+ This minor node decsribes how to use the arbitrary precision (also
+known as "multiple precision" or "infinite precision") numeric
+capabilites in `gawk' to produce maximally accurate results when you
+need it. But first you should check if your version of `gawk' supports
+arbitrary precision arithmetic. The easiest way to find out is to look
+at the output of the following command:
$ gawk version
 GNU Awk 4.1.0 (GNU MPFR 3.1.0, GNU MP 5.0.3)
 Copyright (C) 1989, 19912012 Free Software Foundation.
 ..
+ ...
 Gawk uses the GNU MPFR and MP libraries for arbitrary precision
arithmetic on numbers. So if you do not see the names of these
libraries in the output above, then your version of `gawk' does not
support arbitrary precision math.
+ `gawk' uses the GNU MPFR (http://www.mpfr.org) and GNU MP
+(http://gmplib.org) (GMP) libraries for arbitrary precision arithmetic
+on numbers. So if you do not see the names of these libraries in the
+output, then your version of `gawk' does not support arbitrary
+precision arithmetic.
Even if you aren't interested in arbitrary precision arithmetic, you
may still benifit from knowing about how `gawk' handles numbers in
@@ 13699,8 +13704,9 @@ numbers.
 Footnotes 
 (1) Donald E. Knuth. The Art of Computer Programming. Volume 2,
Seminumerical Algorithms, 3rd edition, 1998, ISBN 0201896834, p. 229.
+ (1) Donald E. Knuth. `The Art of Computer Programming'. Volume 2,
+`Seminumerical Algorithms', third edition, 1998, ISBN 0201896834, p.
+229.
File: gawk.info, Node: Floatingpoint Programming, Next: Floatingpoint
Representation, Up: Arbitrary Precision Arithmetic
@@ 13719,33 +13725,34 @@ Simple values like 0.1 cannot be precisely
represented using binary
floatingpoint numbers, and the limited precision of floatingpoint
numbers means that slight changes in the order of operations or the
precision of intermediate storage can change the result. To make
matters worse with arbitrary precision floatingpoint, one can set the
precision before starting a computation, and then one cannot be sure of
+matters worse with arbitrary precision floatingpoint, you can set the
+precision before starting a computation, but then you cannot be sure of
the final result.
Sometimes you need to think more about what you really want and
what's really happening. Consider the two numbers in the following
example:
 x = 0.875 # 1/2 + 1/4 + 1/8
 y = 0.425
+ x = 0.875 # 1/2 + 1/4 + 1/8
+ y = 0.425
 Unlike the number in y, the number stored in x is exactly
+ Unlike the number in `y', the number stored in `x' is exactly
representable in binary since it can be written as a finite sum of one
or more fractions whose denominators are all powers of two. When
`gawk' reads a floatingpoint number from a program source, it
automatically rounds that number to whatever precision that your
machine supports. If you try to print the numeric content of a variable
using an output format string "%.17g", it may not produce the same
+`gawk' reads a floatingpoint number from program source, it
+automatically rounds that number to whatever precision your machine
+supports. If you try to print the numeric content of a variable using
+an output format string of `"%.17g"', it may not produce the same
number as you assigned to it:
 $ gawk 'BEGIN { printf("%0.17g, %0.17g\n", x, y) }'
+ $ gawk 'BEGIN { x = 0.875; y = 0.425
+ > printf("%0.17g, %0.17g\n", x, y) }'
 0.875, 0.42499999999999999
Often the error is so small you do not even notice it, and if you do,
you can always specify how much precision you would like in your output.
Usually this is a format string like "%.15g", which when used in the
example above will produce an output identical to the input.
+Usually this is a format string like `"%.15g"', which when used in the
+previous example, produces an output identical to the input.
Because the underlying representation can be little bit off from the
exact value, comparing floats to see if they are equal is generally not
@@ 13758,10 +13765,9 @@ a good idea. Here is an example where it does not
work like you expect:
numbers usually isn't enough to worry about. However, if you compute a
value which is the result of a sequence of floating point operations,
the error can accumulate and greatly affect the computation itself.
Here is an attempt to compute the value of the constant `pi' using one
of its many series representations:
+Here is an attempt to compute the value of the constant pi using one of
+its many series representations:
 $ cat pi.awk
BEGIN {
x = 1.0 / sqrt(3.0)
n = 6
@@ 13773,9 +13779,22 @@ of its many series representations:
}
When run, the early errors propagating through later computations
will cause the loop to terminate prematurely after an attempt to divide
by zero. Here is one more example where the inaccuracies in internal
representations yield unexpected result:
+cause the loop to terminate prematurely after an attempt to divide by
+zero.
+
+ $ gawk f pi.awk
+  3.215390309173475
+  3.159659942097510
+  3.146086215131467
+  3.142714599645573
+ ...
+  3.224515243534819
+  2.791117213058638
+  0.000000000000000
+ error> gawk: pi.awk:6: fatal: division by zero attempted
+
+ Here is one more example where the inaccuracies in internal
+representations yield an unexpected result:
$ gawk 'BEGIN {
> for (d = 1.1; d <= 1.5; d += 0.1)
@@ 13784,15 +13803,16 @@ representations yield unexpected result:
> }'
 4
 Can computation using aribitrary precision help with the examples
above? If you are impatient to know, *Note Exact Arithmetic::.
Instead of aribitrary precision floatingpoint arithmetic, often all
you need is an adjustment of your logic or different order for the
+ Can computation using aribitrary precision help with the previous
+examples? If you are impatient to know, see *note Exact Arithmetic::.
+
+ Instead of aribitrary precision floatingpoint arithmetic, often all
+you need is an adjustment of your logic or a different order for the
operations in your calculation. The stability and the accuracy of the
computation of the constant `pi' in the example above can be enhanced
+computation of the constant pi in the previous example can be enhanced
by using the following simple algebraic transformation:
 (sqrt(x * x + 1)  1) / x = x / (sqrt(x * x + 1) + x)
+ (sqrt(x * x + 1)  1) / x = x / (sqrt(x * x + 1) + x)
There is no need to be unduly suspicious about the results from
floatingpoint arithmetic. The lesson to remember is that
@@ 13813,13 +13833,18 @@ File: gawk.info, Node: Floatingpoint
Representation, Next: Floatingpoint Con
Although floatingpoint representations vary from machine to machine,
the most commonly encountered representation is that defined by the
IEEE 754 Standard. An IEEE754 format has three components: a sign bit
telling whether the number is positive or negative, an exponent giving
its order of magnitude E, and a significand S specifying the actual
digits of the number. The value of the number is then S * 2^E. The
first bit of a nonzero binary significand is always one so the
significand in an IEEE754 format only includes the fractional part
leaving the leading one implicit.
+IEEE 754 Standard. An IEEE754 format value has three components:
+
+ * a sign bit telling whether the number is positive or negative,
+
+ * an "exponent" giving its order of magnitude, E,
+
+ * and a "significand", S, specifying the actual digits of the number.
+
+ The value of the number is then S * 2^E. The first bit of a
+nonzero binary significand is always one, so the significand in an
+IEEE754 format only includes the fractional part, leaving the leading
+one implicit.
Three of the standard IEEE754 types are 32bit single precision,
64bit double precision and 128bit quadruple precision. The standard
@@ 13851,7 +13876,7 @@ range for exponents. The context has the following
primary components:
`rounding'
The rounding mode of this context.
 *Note tableieeeformats:: lists the precision and exponent field
+ *note tableieeeformats:: lists the precision and exponent field
values for the basic IEEE754 binary formats:
Name Total bits Precision emin emax
@@ 13865,21 +13890,21 @@ Table 11.1: Basic IEEE Formats
NOTE: The precision numbers include the implied leading one that
gives them one extra bit of significand.
 A floatingpoint context can also determine which signals are
treated as exceptions, or can set rules for arithmetic with special
values. The interested reader should consult the IEEE754 standard or
other resources for details.
+ A floatingpoint context can also determine which signals are treated
+as exceptions, and can set rules for arithmetic with special values.
+Please consult the IEEE754 standard or other resources for details.
 Gawk ordinarily uses the hardware double precision for a number. On
most systems, it is in IEEE754 floatingpoint format which corresponds
to 64bit binary with 53 bits of precision.
+ `gawk' ordinarily uses the hardware double precision representation
+for numbers. On most systems, this is IEEE754 floatingpoint format,
+corresponding to 64bit binary with 53 bits of precision.
NOTE: In case an underflow occurs, the standard allows, but does
 not require, the smallest normal number to loose precision
+ not require, the smallest normal number to lose precision
gradually when an arithmetic operation is not exactly zero but is
 too close to zero. Such numbers do not have as many significant
 digits as normal numbers, and are called denormals or subnormals.
 The basic IEEE754 binary formats support subnormal numbers.
+ too close to zero. Such numbers do not have as many significant
+ digits as normal numbers, and are called "denormals" or
+ "subnormals". The basic IEEE754 binary formats support subnormal
+ numbers.
File: gawk.info, Node: Rounding Mode, Next: Arbitrary Precision Floats,
Prev: Floatingpoint Context, Up: Arbitrary Precision Arithmetic
@@ 13887,36 +13912,36 @@ File: gawk.info, Node: Rounding Mode, Next:
Arbitrary Precision Floats, Prev:
11.4 Floatingpoint Rounding Mode
=================================
Rounding mode specifies the behavior for the results of numerical
operations when discarding extra precision. Each rounding mode
indicates how the least significant returned digit of a rounded result
is to be calculated. *Note tableroundingmodes:: lists the IEEE754
defined rounding modes:
+The "rounding mode" specifies the behavior for the results of numerical
+operations when discarding extra precision. Each rounding mode indicates
+how the least significant returned digit of a rounded result is to be
+calculated. The `RNDMODE' variable (*note Setting Rounding Mode::)
+provides program level control over the rounding mode. *note
+tableroundingmodes:: lists the IEEE754 defined rounding modes:
Rounding Mode IEEE Name `RNDMODE' (*note
 Setting Rounding
 Mode::)
+Rounding Mode IEEE Name `RNDMODE'

Round to nearest, ties to even `roundTiesToEven' `"N"' or `"n"'
Round toward plus 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 to nearest, ties to even `roundTiesToEven' `"N"' or `"n"'
+Round toward plus 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
Table 11.2: Rounding Modes
The default mode `roundTiesToEven' is the most preferred, but the
least intuitive. This method does the obvious thing for most values, by
rounding them up or down to the nearest digit. For example, rounding
1.132 to two digits yields 1.13, and rounding 1.157 yields 1.16. When
it comes to rounding a value that is exactly halfway between, it does
not probably work the way you have learned in school. In this case,
the number is rounded to the nearest even digit. So rounding 0.125 to
two digits rounds down to 0.12, but rounding 0.6875 to three digits
rounds up to 0.688. You probably have already encountered this
rounding mode when using the `printf' routine to format floatingpoint
numbers. For example:
+1.132 to two digits yields 1.13, and rounding 1.157 yields 1.16.
+
+ However, when it comes to rounding a value that is exactly halfway
+between, things do not work the way you probably learned in school. In
+this case, the number is rounded to the nearest even digit. So
+rounding 0.125 to two digits rounds down to 0.12, but rounding 0.6875
+to three digits rounds up to 0.688. You probably have already
+encountered this rounding mode when using the `printf' routine to
+format floatingpoint numbers. For example:
BEGIN {
x = 4.5
@@ 13945,8 +13970,8 @@ This is the default rounding mode used in IEEE754
computing functions
and operators.
The other rounding modes are rarely used. Round toward positive
infinity `roundTowardPositive' and round toward negative infinity
`roundTowardNegative' are often used to implement interval arithmetic,
+infinity (`roundTowardPositive') and round 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 floatingpoint numbers to integers. The rounding mode
@@ 13954,14 +13979,14 @@ converting floatingpoint numbers to integers. The
rounding mode
the number with the larger magnitude if a tie occurs.
Some numerical analysts will tell you that your choice of rounding
style has tremendous impact on the final outcome, and advice you to
wait until final output for any rounding. This goal can often be
achieved by setting the precision initially to some value sufficiently
larger than the final desired precision so that the accumulation of
roundoff error do not influence the outcome. If you suspect that
results from your computation are sensitive to accumulation of
roundoff error, one way to be sure is to look for significant
difference in output when you change the rounding mode.
+style has tremendous impact on the final outcome, and advise you to
+wait until final output for any rounding. Instead, you can often
+achieve this goal by setting the precision initially to some value
+sufficiently larger than the final desired precision, so that the
+accumulation of roundoff error does not influence the outcome. If you
+suspect that results from your computation are sensitive to
+accumulation of roundoff error, one way to be sure is to look for a
+significant difference in output when you change the rounding mode.
 Footnotes 
@@ 13975,24 +14000,25 @@ File: gawk.info, Node: Arbitrary Precision Floats,
Next: Setting Precision, P
11.5 Arbitrary Precision Floatingpoint Arithmetic with `gawk'
==============================================================
Gawk uses the GNU MPFR library for arbitrary precision floatingpoint
+`gawk' uses the GNU MPFR library for arbitrary precision floatingpoint
arithmetic. The MPFR library provides precise control over precisions
and rounding modes, and gives correctly rounded reproducible
platformindependent results. With the commandline option
`arbitraryprecision' or `M', all floatingpoint arithmetic
operators and numeric functions can yield results to any desired
precision level supported by MPFR. Two builtin variables `PREC' (*note
Setting Precision::) and `RNDMODE' (*note Setting Rounding Mode::) give
a simple way of controlling the working precision and the rounding mode
in `gawk'. The precision and the rounding mode are set globally for
every operation to follow. The default working precision for arbitrary
precision floats is 53(1) and the default value for `RNDMODE' is `"N"'
which selects the IEEE754 `roundTiesToEven' (*note Rounding Mode::)
rounding mode. The default exponent range in MPFR (EMAX = 2^30  1,
EMIN = EMAX) is used by `gawk' for all floatingpoint contexts. There
is no explicit mechanism in `gawk' to adjust the exponent range. MPFR
does not implement subnormal numbers by default, and this behavior
cannot be changed in `gawk'.
+precision level supported by MPFR. Two builtin variables `PREC'
+(*note Setting Precision::) and `RNDMODE' (*note Setting Rounding
+Mode::) provide control over the working precision and the rounding
+mode. The precision and the rounding mode are set globally for every
+operation to follow.
+
+ The default working precision for arbitrary precision floats is 53,
+and the default value for `RNDMODE' is `"N"', which selects the IEEE754
+`roundTiesToEven' (*note Rounding Mode::) rounding mode.(1) `gawk' uses
+the default exponent range in MPFR (EMAX = 2^30  1, EMIN = EMAX) for
+all floatingpoint contexts. There is no explicit mechanism to adjust
+the exponent range. MPFR does not implement subnormal numbers by
+default, and this behavior cannot be changed in `gawk'.
NOTE: When emulating an IEEE754 format (*note Setting
Precision::), `gawk' internally adjusts the exponent range to the
@@ 14001,17 +14027,17 @@ cannot be changed in `gawk'.
NOTE: MPFR numbers are variablesize entities, consuming only as
much space as needed to store the significant digits. Since the
 performance using MPFR numbers pales compared to doing math on the
 underlying machine types, you should consider only using as much
 precision as needed by your program.
+ performance using MPFR numbers pales in comparison to doing math
+ using the underlying machine types, you should consider using only
+ as much precision as needed by your program.
 Footnotes 
(1) The default precision is 53, since according to the MPFR
documentation, mpfr should be able to exactly reproduce all
+documentation, the library should be able to exactly reproduce all
computations with doubleprecision machine floatingpoint numbers
(double type in C), except the default exponent range is much wider and
subnormal numbers are not implemented.
+(`double' type in C), except the default exponent range is much wider
+and subnormal numbers are not implemented.
File: gawk.info, Node: Setting Precision, Next: Setting Rounding Mode,
Prev: Arbitrary Precision Floats, Up: Arbitrary Precision Arithmetic
@@ 14019,7 +14045,7 @@ File: gawk.info, Node: Setting Precision, Next:
Setting Rounding Mode, Prev:
11.6 Setting the Working Precision
==================================
Gawk uses a global working precision; it does not keep track of the
+`gawk' uses a global working precision; it does not keep track of the
precision or accuracy of individual numbers. Performing an arithmetic
operation or calling a builtin function rounds the result to the
current working precision. The default working precision is 53 which
@@ 14027,13 +14053,13 @@ can be modified using the builtin variable `PREC'.
You can also set the
value to one of the following predefined caseinsensitive strings to
emulate an IEEE754 binary format:
`PREC' IEEE754 Binary Format

`"half"' 16bit halfprecision.
`"single"'Basic 32bit single precision.
`"double"'Basic 64bit double precision.
`"quad"' Basic 128bit quadruple precision.
`"oct"' 256bit octuple precision.
+`PREC' IEEE754 Binary Format
+
+`"half"' 16bit halfprecision.
+`"single"' Basic 32bit single precision.
+`"double"' Basic 64bit double precision.
+`"quad"' Basic 128bit quadruple precision.
+`"oct"' 256bit octuple precision.
The following example illustrates the effects of changing precision
on arithmetic operations:
@@ 14044,32 +14070,36 @@ on arithmetic operations:
 0
Binary and decimal precisions are related approximately according to
the formula `prec = 3.322 * dps', where `prec' denotes the binary
precision (measured in bits) and `dps' (short for decimal places) is
the decimal digits. We can easily calculate how many decimal digits the
53bit significand of an IEEE double is equivalent to: 53 / 3.332 which
is equal to about 15.95. But what does 15.95 digits actually mean? It
depends whether you are concerned about how many digits you can rely
on, or how many digits you need.
+the formula:
+
+ PREC = 3.322 * DPS
+
+Here, PREC denotes the binary precision (measured in bits) and DPS
+(short for decimal places) is the decimal digits. We can easily
+calculate how many decimal digits the 53bit significand of an IEEE
+double is equivalent to: 53 / 3.332 which is equal to about 15.95. But
+what does 15.95 digits actually mean? It depends whether you are
+concerned about how many digits you can rely on, or how many digits you
+need.
It is important to know how many bits it takes to uniquely identify
a double. If you want to roundtrip from double to decimal and back to
double (saving a double representing an intermediate result to a file,
and later reading it back to restart the computation for instance) then
few more decimal digits are required. 17 digits will generally be
enough for a double.
+a doubleprecision value (the C type `double'). If you want to convert
+from `double' to decimal and back to `double' (e.g., saving a `double'
+representing an intermediate result to a file, and later reading it
+back to restart the computation), then a few more decimal digits are
+required. 17 digits is generally enough for a `double'.
It can also be important to know what decimal numbers can be uniquely
represented with a floatingpoint double. If you want to roundtrip
from decimal to double and back again, 15 is the most that you can get.
Stated differently, you should not present the numbers from your
+represented with a `double'. If you want to convert from decimal to
+`double' and back again, 15 digits is the most that you can get. Stated
+differently, you should not present the numbers from your
floatingpoint computations with more than 15 significant digits in
them.
Conversely, it takes a precision of 332 bits to hold an approximation
of constant `pi' that is accurate to 100 decimal places. You should
always add few extra bits in order to avoid confusing roundoff issues
that occur because numbers are stored internally in binary.
+of constant pi that is accurate to 100 decimal places. You should
+always add some extra bits in order to avoid the confusing roundoff
+issues that occur because numbers are stored internally in binary.
File: gawk.info, Node: Setting Rounding Mode, Next: Floatingpoint
Constants, Prev: Setting Precision, Up: Arbitrary Precision Arithmetic
@@ 14077,19 +14107,19 @@ File: gawk.info, Node: Setting Rounding Mode, Next:
Floatingpoint Constants,
11.7 Setting the Rounding Mode
==============================
The builtin variable `RNDMODE' has the default value `"N"' which
+The builtin variable `RNDMODE' has the default value `"N"', which
selects the IEEE754 rounding mode `roundTiesToEven'. The other
possible values for `RNDMODE' are `"U"' for rounding mode
`roundTowardPositive', `"D"' for `roundTowardNegative', and `"Z"' for
`roundTowardZero'. Gawk also accepts `"A"' to select the IEEE754 mode
`roundTiesToAway' if the version of your MPFR library supports it,
+`roundTowardZero'. `gawk' also accepts `"A"' to select the IEEE754
+mode `roundTiesToAway' if your version of the MPFR library supports it;
otherwise setting `RNDMODE' to this value has no effect. *Note Rounding
Mode::, for the meanings of the various round modes.
+Mode::, for the meanings of the various rounding modes.
Here is an example of how to change the default rounding behavior of
the `printf' output:
+`printf''s output:
 $ gawk M vRNDMODE="Z" 'BEGIN{ printf("%.2f\n", 1.378)}'
+ $ gawk M vRNDMODE="Z" 'BEGIN { printf("%.2f\n", 1.378) }'
 1.37
@@ 14099,8 +14129,8 @@ File: gawk.info, Node: Floatingpoint Constants,
Next: Changing Precision, Pr
==========================================
Be wary of floatingpoint constants! When reading a floatingpoint
constant from a program source, `gawk' uses the default precision,
unless overridden by an assignment to the special variable `PREC' in
+constant from program source code, `gawk' uses the default precision,
+unless overridden by an assignment to the special variable `PREC' on
the command line, to store it internally as a MPFR number. Changing
the precision using `PREC' in the program text does not change the
precision of a constant. If you need to represent a floatingpoint
@@ 14110,17 +14140,17 @@ constant as a string, or a rational number whenever
possible. The
following example illustrates the differences among various ways to
print a floatingpoint constant:
 $ gawk M 'BEGIN { PREC=113; printf("%0.25f\n", 0.1) }'
+ $ gawk M 'BEGIN { PREC = 113; printf("%0.25f\n", 0.1) }'
 0.1000000000000000055511151
 $ gawk M vPREC=113 'BEGIN { printf("%0.25f\n", 0.1) }'
+ $ gawk M vPREC = 113 'BEGIN { printf("%0.25f\n", 0.1) }'
 0.1000000000000000000000000
 $ gawk M 'BEGIN { PREC=113; printf("%0.25f\n", "0.1") }'
+ $ gawk M 'BEGIN { PREC = 113; printf("%0.25f\n", "0.1") }'
 0.1000000000000000000000000
 $ gawk M 'BEGIN { PREC=113; printf("%0.25f\n", 1/10) }'
+ $ gawk M 'BEGIN { PREC = 113; printf("%0.25f\n", 1/10) }'
 0.1000000000000000000000000
 In the first case above, the number is stored with the default
precision of 53.
+ In the first case, the number is stored with the default precision
+of 53.
File: gawk.info, Node: Changing Precision, Next: Exact Arithmetic, Prev:
Floatingpoint Constants, Up: Arbitrary Precision Arithmetic
@@ 14128,33 +14158,32 @@ File: gawk.info, Node: Changing Precision, Next:
Exact Arithmetic, Prev: Floa
11.9 Changing the Precision of a Number
=======================================
 .. The point is that in any variableprecision package, a decision
 is made on how to treat numbers given as data, or arising in
+ The point is that in any variableprecision package, a decision is
+ made on how to treat numbers given as data, or arising in
intermediate results, which are represented in floatingpoint
format to a precision lower than working precision. Do we promote
them to full membership of the highprecision club, or do we treat
them and all their associates as secondclass citizens? Sometimes
the first course is proper, sometimes the second, and it takes
 careful analysis to tell which.(1)
+ careful analysis to tell which.
 Dirk Laurie
+ Dirk Laurie(1)
 Gawk does not implicitly modify the precision of any previously
+ `gawk' does not implicitly modify the precision of any previously
computed results when the working precision is changed with an
assignment to `PREC' in the program. The precision of a number is
always the one that was used at the time of its creation, and there is
no way for the user to explicitly change it thereafter. However, since
the result of a floatingpoint arithmetic operation is always an
arbitrary precision float with a precision set by the value of `PREC',
the following workaround will effectively accomplish the same desired
behavior:
+assignment to `PREC'. The precision of a number is always the one that
+was used at the time of its creation, and there is no way for the user
+to explicitly change it afterwards. However, since the result of a
+floatingpoint arithmetic operation is always an arbitrary precision
+floatingpoint valuewith a precision set by the value of `PREC'the
+following workaround effectively accomplishes the desired behavior:
 x = x + 0.0
+ x = x + 0.0
 Footnotes 
 (1) Dirk Laurie. Variableprecision Arithmetic Considered Perilous 
A Detective Story. Electronic Transactions on Numerical Analysis.
+ (1) Dirk Laurie. `Variableprecision Arithmetic Considered Perilous
+ A Detective Story'. Electronic Transactions on Numerical Analysis.
Volume 28, pp. 168173, 2008.
@@ 14173,16 +14202,18 @@ and associative laws do not hold completely, and
order of operation may
be important for your computation. Rounding error, cumulative precision
loss and underflow are often troublesome.
 When `gawk' tests the expressions 0.1 + 12.2 and 12.3 for equality
using the machine double precision arithmetic it decides that they are
not equal (*note Floatingpoint Programming::)! You can get the result
you want by increasing the precision, 56 in this case will get the job
done:
+ When `gawk' tests the expressions `0.1 + 12.2' and `12.3' for
+equality using the machine double precision arithmetic, it decides that
+they are not equal! (*Note Floatingpoint Programming::.) You can get
+the result you want by increasing the precision; 56 in this case will
+get the job done:
$ gawk M vPREC=56 'BEGIN { print (0.1 + 12.2 == 12.3) }'
 1
 Using an even larger value of `PREC':
+ If adding more bits is good, perhaps adding even more bits of
+precicision is better? Here is what happens if we use an even larger
+value of `PREC':
$ gawk M vPREC=201 'BEGIN { print (0.1 + 12.2 == 12.3) }'
 0
@@ 14190,23 +14221,23 @@ done:
This is not a bug in `gawk' or in the MPFR library. It is easy to
forget that the finite number of bits used to store the value is often
just an approximation after proper rounding. The test for equality
succeeds if and only if all bits in the two operands are exactly the
+succeeds if and only if _all_ bits in the two operands are exactly the
same. Since this is not necessarily true after floatingpoint
computations with a particular precision and the effective rounding
rule, a straight test for equality may not work.
+computations with a particular precision and effective rounding rule, a
+straight test for equality may not work.
 So don't assume that floatingpoint values can be compared for
+ So, don't assume that floatingpoint values can be compared for
equality. You should also exercise caution when using other forms of
comparisons. The standard way to compare between floatingpoint
numbers is to determine how much error (or tolerance) you will allow in
a comparison and check to see if one value is within this error range
of the other.
+numbers is to determine how much error (or "tolerance") you will allow
+in a comparison and check to see if one value is within this error
+range of the other.
In applications where 15 or fewer decimal places suffice, hardware
double precision arithmetic can be adequate, and is usually much faster.
But you do need to keep in mind that every floatingpoint operation can
suffer a new rounding error with catastrophic consequences as
illustrated by our attempt to compute the value of the constant `pi',
+illustrated by our attempt to compute the value of the constant pi,
(*note Floatingpoint Programming::). Extra precision can greatly
enhance the stability and the accuracy of your computation in such
cases.
@@ 14228,20 +14259,20 @@ precision with 64bit IEEE binary floatingpoint
representation for
numbers on most systems. A large integer like 9007199254740997 has a
binary representation that, although finite, is more than 53 bits long;
it must also be rounded to 53 bits. The biggest integer that can be
stored in a double is usually the same as the largest possible value of
a double. If your system double is an IEEE 64bit double, it is an
integer and can be represented precisely. What more should one know
about integers?
+stored in a C `double' is usually the same as the largest possible
+value of a `double'. If your system `double' is an IEEE 64bit
+`double', this largest possible value is an integer and can be
+represented precisely. What more should one know about integers?
If you want to know what is the largest integer, such that it and
all smaller integers can be stored in 64bit doubles without losing
precision, then the answer is 2^53. The next representable number is
the even number 2^53 + 2 meaning it is unlikely that you will be able
to make `gawk' to print 2^53 + 1 in integer format. The range of
integers exactly representable by a 64bit double is [2^53, 2^53]. If
you ever see an integer outside this range in `gawk' using 64bit
doubles, you have the reason to be very suspicious about the accuracy
of the output. Here is a simple program with erroneous output:
+precision, then the answer is 2^53. The next representable number is
+the even number 2^53 + 2, meaning it is unlikely that you will be able
+to make `gawk' print 2^53 + 1 in integer format. The range of integers
+exactly representable by a 64bit double is [2^53, 2^53]. If you ever
+see an integer outside this range in `gawk' using 64bit doubles, you
+have reason to be very suspicious about the accuracy of the output.
+Here is a simple program with erroneous output:
$ gawk 'BEGIN { i = 2^53  1; for (j = 0; j < 4; j++) print i + j }'
 9007199254740991
@@ 14249,9 +14280,9 @@ of the output. Here is a simple program with erroneous
output:
 9007199254740992
 9007199254740994
 The lesson is not to assume a large integer printed by `gawk' to be
an exact result from your computation, especially if it wraps around on
your terminal screen.
+ The lesson is to not assume that any large integer printed by `gawk'
+represents an exact result from your computation, especially if it wraps
+around on your screen.
File: gawk.info, Node: Arbitrary Precision Integers, Next: MPFR and GMP
Libraries, Prev: Integer Programming, Up: Arbitrary Precision Arithmetic
@@ 14259,14 +14290,14 @@ File: gawk.info, Node: Arbitrary Precision Integers,
Next: MPFR and GMP Librar
11.12 Arbitrary Precision Integer Arithmetic with `gawk'
========================================================
If the option `arbitraryprecision' or `M' is specified, `gawk' will
perform all integer arithmetic using GMP arbitrary precision integers.
+If the option `arbitraryprecision' or `M' is specified, `gawk'
+performs all integer arithmetic using GMP arbitrary precision integers.
Any number that looks like an integer in a program source or data file
will be stored as an arbitrary precision integer. The size of the
integer is limited only by your computer's memory. The current
floatingpoint context has no effect on operations involving integers.
For example, the following computes 5^4^3^2, the result of which is
beyond the limits of ordinary `gawk' numbers:
+is stored as an arbitrary precision integer. The size of the integer
+is limited only by your computer's memory. The current floatingpoint
+context has no effect on operations involving integers. For example,
+the following computes 5^4^3^2, the result of which is beyond the
+limits of ordinary `gawk' numbers:
$ gawk M 'BEGIN {
> x = 5^4^3^2
@@ 14276,49 +14307,52 @@ beyond the limits of ordinary `gawk' numbers:
 # of digits = 183231
 62060698786608744707 ... 92256259918212890625
 If you were to compute the same using arbitrary precision floats
instead, the precision needed for correct output, using the formula
`prec = 3.322 * dps', would be 3.322 * 183231 or 608693.
+ If you were to compute the same value using arbitrary precision
+floatingpoint values instead, the precision needed for correct output
+(using the formula `prec = 3.322 * dps'), would be 3.322 x 183231, or
+608693.
 The result from an arithmetic operation with an integer and a float
is a float with a precision equal to the working precision. The
following program calculates the eighth term in Sylvester's sequence
using a recurrence:
+ The result from an arithmetic operation with an integer and a
+floatingpoint value is a floatingpoint value with a precision equal
+to the working precision. The following program calculates the eighth
+term in Sylvester's sequence using a recurrence:
$ gawk M 'BEGIN {
> s = 2.0
> for (i = 1; i <= 7; i++)
> s = s * (s  1) + 1
 > print s}'
+ > print s
+ > }'
 113423713055421845118910464
 The output differs from the acutal number 113423713055421844361000443
because the default precision 53 is not enough to represent the
floatingpoint results exactly. You can either increase the precision
(100 in this case is enough), or replace the float 2.0 with an integer
to perform all computations using integer arithmetic to get the correct
output.
+ The output differs from the acutal number,
+113423713055421844361000443, because the default precision of 53 is not
+enough to represent the floatingpoint results exactly. You can either
+increase the precision (100 is enough in this case), or replace the
+floatingpoint constant `2.0' with an integer, to perform all
+computations using integer arithmetic to get the correct output.
It will sometimes be necessary for `gawk' to implicitly convert an
arbitrary precision integer into an arbitrary precision float. This is
primarily because the MPFR library does not always provide the relevant
interface to process arbitrary precision integers or mixedmode numbers
as needed by an operation or function. In such a case, the precision
is set to the minimum value necessary for exact conversion, and the
working precision is not used for this purpose. If this is not what
you need or want, you can employ a subterfuge like this:
+arbitrary precision integer into an arbitrary precision floatingpoint
+value. This is primarily because the MPFR library does not always
+provide the relevant interface to process arbitrary precision integers
+or mixedmode numbers as needed by an operation or function. In such a
+case, the precision is set to the minimum value necessary for exact
+conversion, and the working precision is not used for this purpose. If
+this is not what you need or want, you can employ a subterfuge like
+this:
 $ gawk M 'BEGIN { n = 13; print (n + 0.0) % 2.0 }'
+ gawk M 'BEGIN { n = 13; print (n + 0.0) % 2.0 }'
You can avoid this issue altogether by specifying the number as a
float to begin with:
 $ gawk M 'BEGIN { n = 13.0; print n % 2.0 }'
+ gawk M 'BEGIN { n = 13.0; print n % 2.0 }'
Note that for the particular example above, there is unlikely to be a
reason for simply not using the following:
 $ gawk M 'BEGIN { n = 13; print n % 2 }'
+ gawk M 'BEGIN { n = 13; print n % 2 }'
File: gawk.info, Node: MPFR and GMP Libraries, Prev: Arbitrary Precision
Integers, Up: Arbitrary Precision Arithmetic
@@ 14326,8 +14360,9 @@ File: gawk.info, Node: MPFR and GMP Libraries, Prev:
Arbitrary Precision Integ
11.13 Information About the MPFR and GMP Libraries
==================================================
There are few elements available in the `PROCINFO' array to provide
information about the MPFR and GMP libraries. (*Note Autoset::.)
+There are a few elements available in the `PROCINFO' array to provide
+information about the MPFR and GMP libraries. *Note Autoset::, for
+more information.
File: gawk.info, Node: Advanced Features, Next: Library Functions, Prev:
Arbitrary Precision Arithmetic, Up: Top
@@ 14349,7 +14384,7 @@ full detail, along with the basics of TCP/IP
networking. Finally,
`gawk' can "profile" an `awk' program, making it possible to tune it
for performance.
 *Note Dynamic Extensions::, discusses the ability to dynamically add
+ *note Dynamic Extensions::, discusses the ability to dynamically add
new builtin functions to `gawk'. As this feature is still immature
and likely to change, its description is relegated to an appendix.
@@ 14437,7 +14472,7 @@ of arrays inside `awk'.
in a particular order that you, the programmer, choose. `gawk' lets
you do this.
 *Note Controlling Scanning::, describes how you can assign special,
+ *note Controlling Scanning::, describes how you can assign special,
predefined values to `PROCINFO["sorted_in"]' in order to control the
order in which `gawk' will traverse an array during a `for' loop.
@@ 15185,14 +15220,14 @@ File: gawk.info, Node: Library Functions, Next:
Sample Programs, Prev: Advanc
13 A Library of `awk' Functions
*******************************
*Note Userdefined::, describes how to write your own `awk' functions.
+*note Userdefined::, describes how to write your own `awk' functions.
Writing functions is important, because it allows you to encapsulate
algorithms and program tasks in a single place. It simplifies
programming, making program development more manageable, and making
programs more readable.
One valuable way to learn a new programming language is to _read_
programs in that language. To that end, this major node and *Note
+programs in that language. To that end, this major node and *note
Sample Programs::, provide a goodsized body of code for you to read,
and hopefully, to learn from.
@@ 15201,16 +15236,16 @@ of the sample programs presented later in this Info
file use these
functions. The functions are presented here in a progression from
simple to complex.
 *Note Extract Program::, presents a program that you can use to
+ *note Extract Program::, presents a program that you can use to
extract the source code for these example library functions and
programs from the Texinfo source for this Info file. (This has already
been done as part of the `gawk' distribution.)
If you have written one or more useful, generalpurpose `awk'
functions and would like to contribute them to the `awk' user
community, see *Note How To Contribute::, for more information.
+community, see *note How To Contribute::, for more information.
 The programs in this major node and in *Note Sample Programs::,
+ The programs in this major node and in *note Sample Programs::,
freely use features that are `gawk'specific. Rewriting these programs
for different implementations of `awk' is pretty straightforward.
@@ 15312,7 +15347,7 @@ program, leading to bugs that are very difficult to
track down:
single associative array to hold the values needed by the library
function(s), or "package." This significantly decreases the number of
actual global names in use. For example, the functions described in
*Note Passwd Functions::, might have used array elements
+*note Passwd Functions::, might have used array elements
`PW_data["inited"]', `PW_data["total"]', `PW_data["count"]', and
`PW_data["awklib"]', instead of `_pw_inited', `_pw_awklib', `_pw_total',
and `_pw_count'.
@@ 15750,7 +15785,7 @@ File: gawk.info, Node: Gettimeofday Function, Prev:
Join Function, Up: Genera
13.2.7 Managing the Time of Day

The `systime()' and `strftime()' functions described in *Note Time
+The `systime()' and `strftime()' functions described in *note Time
Functions::, provide the minimum functionality necessary for dealing
with the time of day in human readable form. While `strftime()' is
extensive, the control formats are not necessarily easy to remember or
@@ 15822,7 +15857,7 @@ current time formatted in the same way as the `date'
utility:
The string indices are easier to use and read than the various
formats required by `strftime()'. The `alarm' program presented in
*Note Alarm Program::, uses this function. A more general design for
+*note Alarm Program::, uses this function. A more general design for
the `gettimeofday()' function would have allowed the user to supply an
optional timestamp value to use instead of the current time.
@@ 15923,7 +15958,7 @@ solves the problem:
END { endfile(_filename_) }
 *Note Wc Program::, shows how this library function can be used and
+ *note Wc Program::, shows how this library function can be used and
how it simplifies writing the main program.
Advanced Notes: So Why Does `gawk' have `BEGINFILE' and `ENDFILE'?
@@ 15977,7 +16012,7 @@ over with it from the top. For lack of a better name,
we'll call it
This code relies on the `ARGIND' variable (*note Autoset::), which
is specific to `gawk'. If you are not using `gawk', you can use ideas
presented in *Note Filetrans Function::, to either update `ARGIND' on
+presented in *note Filetrans Function::, to either update `ARGIND' on
your own or modify this code as appropriate.
The `rewind()' function also relies on the `nextfile' keyword (*note
@@ 16010,7 +16045,7 @@ program to your `awk' program:
This works, because the `getline' won't be fatal. Removing the
element from `ARGV' with `delete' skips the file (since it's no longer
in the list). See also *Note ARGC and ARGV::.
+in the list). See also *note ARGC and ARGV::.
File: gawk.info, Node: Empty Files, Next: Ignoring Assigns, Prev: File
Checking, Up: Data File Management
@@ 16028,7 +16063,7 @@ program code.
Using `gawk''s `ARGIND' variable (*note Builtin Variables::), it is
possible to detect when an empty data file has been skipped. Similar
to the library file presented in *Note Filetrans Function::, the
+to the library file presented in *note Filetrans Function::, the
following library file calls a function named `zerofile()' that the
user must provide. The arguments passed are the file name and the
position in `ARGV' where it was found:
@@ 16396,7 +16431,7 @@ that it does not try to interpret the `a', etc., as
its own options.
`Optind', so that `awk' does not try to process the commandline
options as file names.
 Several of the sample programs presented in *Note Sample Programs::,
+ Several of the sample programs presented in *note Sample Programs::,
use `getopt()' to process their arguments.
 Footnotes 
@@ 16641,7 +16676,7 @@ once. If you are worried about squeezing every last
cycle out of your
this is not necessary, since most `awk' programs are I/Obound, and
such a change would clutter up the code.
 The `id' program in *Note Id Program::, uses these functions.
+ The `id' program in *note Id Program::, uses these functions.
 Footnotes 
@@ 16654,7 +16689,7 @@ File: gawk.info, Node: Group Functions, Next: Walking
Arrays, Prev: Passwd Fu
13.6 Reading the Group Database
===============================
Much of the discussion presented in *Note Passwd Functions::, applies
+Much of the discussion presented in *note Passwd Functions::, applies
to the group database as well. Although there has traditionally been a
wellknown file (`/etc/group') in a wellknown format, the POSIX
standard only provides a set of C library routines (`<grp.h>' and
@@ 16880,7 +16915,7 @@ body of `_gr_init()' into a `BEGIN' rule).
associative arrays. The functions that the user calls are themselves
very simple, relying on `awk''s associative arrays to do work.
 The `id' program in *Note Id Program::, uses these functions.
+ The `id' program in *note Id Program::, uses these functions.
File: gawk.info, Node: Walking Arrays, Prev: Group Functions, Up: Library
Functions
@@ 16888,7 +16923,7 @@ File: gawk.info, Node: Walking Arrays, Prev: Group
Functions, Up: Library Fun
13.7 Traversing Arrays of Arrays
================================
*Note Arrays of Arrays::, described how `gawk' provides arrays of
+*note Arrays of Arrays::, described how `gawk' provides arrays of
arrays. In particular, any element of an array may be either a scalar,
or another array. The `isarray()' function (*note Type Functions::)
lets you distinguish an array from a scalar. The following function,
@@ 16939,12 +16974,12 @@ File: gawk.info, Node: Sample Programs, Next:
Debugger, Prev: Library Functio
14 Practical `awk' Programs
***************************
*Note Library Functions::, presents the idea that reading programs in a
+*note Library Functions::, presents the idea that reading programs in a
language contributes to learning that language. This major node
continues that theme, presenting a potpourri of `awk' programs for your
reading enjoyment.
 Many of these programs use library functions presented in *Note
+ Many of these programs use library functions presented in *note
Library Functions::.
* Menu:
@@ 17119,7 +17154,7 @@ by characters, the output field separator is set to the
null string:
Using a single space (`" "') for the value of `FS' is incorrect`awk'
would separate fields with runs of spaces, TABs, and/or newlines, and
we want them to be separated with individual spaces. Also remember
that after `getopt()' is through (as described in *Note Getopt
+that after `getopt()' is through (as described in *note Getopt
Function::), we have to clear out all the elements of `ARGV' from 1 to
`Optind', so that `awk' does not try to process the commandline options
as file names.
@@ 17624,7 +17659,7 @@ to something like `myfileaa', `myfileab', and so on,
supply an
additional argument that specifies the file name prefix.
Here is a version of `split' in `awk'. It uses the `ord()' and
`chr()' functions presented in *Note Ordinal Functions::.
+`chr()' functions presented in *note Ordinal Functions::.
The program first sets its defaults, and then tests to make sure
there are not too many arguments. It then looks at each argument in
@@ 18158,7 +18193,7 @@ in its length. Next, `lines' is incremented for each
line read, and
 Footnotes 
(1) `wc' can't just use the value of `FNR' in `endfile()'. If you
examine the code in *Note Filetrans Function::, you will see that `FNR'
+examine the code in *note Filetrans Function::, you will see that `FNR'
has already been reset by the time `endfile()' is called.
(2) Since `gawk' understands multibyte locales, this code counts
@@ 18254,7 +18289,7 @@ prints the message on the standard output. In addition,
you can give it
the number of times to repeat the message as well as a delay between
repetitions.
 This program uses the `gettimeofday()' function from *Note
+ This program uses the `gettimeofday()' function from *note
Gettimeofday Function::.
All the work is done in the `BEGIN' rule. The first part is argument
@@ 18762,7 +18797,7 @@ File: gawk.info, Node: Extract Program, Next: Simple
Sed, Prev: History Sorti
14.3.7 Extracting Programs from Texinfo Source Files

The nodes *Note Library Functions::, and *Note Sample Programs::, are
+The nodes *note Library Functions::, and *note Sample Programs::, are
the top level nodes for a large number of `awk' programs. If you want
to experiment with these programs, it is tedious to have to type them
in by hand. Here we present a program that can extract parts of a
@@ 19043,7 +19078,7 @@ File: gawk.info, Node: Igawk Program, Next: Anagram
Program, Prev: Simple Sed
14.3.9 An Easy Way to Use Library Functions

In *Note Include Files::, we saw how `gawk' provides a builtin
+In *note Include Files::, we saw how `gawk' provides a builtin
fileinclusion capability. However, this is a `gawk' extension. This
minor node provides the motivation for making file inclusion available
for standard `awk', and shows how to do it using a combination of shell
@@ 20163,7 +20198,7 @@ execution of the program than we saw in our earlier
example:
`si' [COUNT]
Execute one (or COUNT) instruction(s), stepping inside function
calls. (For illustration of what is meant by an "instruction" in
 `gawk', see the output shown under `dump' in *Note Miscellaneous
+ `gawk', see the output shown under `dump' in *note Miscellaneous
Debugger Commands::.)
`until' [[FILENAME`:']N  FUNCTION]
@@ 20570,7 +20605,7 @@ some limitations. A few which are worth being aware of
are:
Rather, it just responds `syntax error'. When you do figure out
what your mistake was, though, you'll feel like a real guru.
 * If you perused the dump of opcodes in *Note Miscellaneous Debugger
+ * If you perused the dump of opcodes in *note Miscellaneous Debugger
Commands::, (or if you are already familiar with `gawk' internals),
you will realize that much of the internal manipulation of data in
`gawk', as in many interpreters, is done on a stack. `Op_push',
@@ 20591,7 +20626,7 @@ some limitations. A few which are worth being aware of
are:
* The `gawk' debugger is designed to be used by running a program
(with all its parameters) on the command line, as described in
 *Note Debugger Invocation::. There is no way (as of now) to
+ *note Debugger Invocation::. There is no way (as of now) to
attach or "break in" to a running program. This seems reasonable
for a language which is used mainly for quickly executing, short
programs.
@@ 20782,7 +20817,7 @@ Other Versions::).
This minor node describes common extensions that originally appeared
in his version of `awk'.
 * The `**' and `**=' operators (*note Arithmetic Ops:: and *Note
+ * The `**' and `**=' operators (*note Arithmetic Ops:: and *note
Assignment Ops::).
* The use of `func' as an abbreviation for `function' (*note
@@ 21175,7 +21210,7 @@ Info file, in approximate chronological order:
* John Haque reworked the `gawk' internals to use a bytecode engine,
providing the `gawk' debugger for `awk' programs.
 * Efraim Yawitz contributed the original text for *Note Debugger::.
+ * Efraim Yawitz contributed the original text for *note Debugger::.
* Arnold Robbins has been working on `gawk' since 1988, at first
helping David Trueman, and as the primary maintainer since around
@@ 21379,7 +21414,7 @@ Various `.c', `.y', and `.h' files
`doc/igawk.1'
The `troff' source for a manual page describing the `igawk'
 program presented in *Note Igawk Program::.
+ program presented in *note Igawk Program::.
`doc/Makefile.in'
The input file used during the configuration process to generate
@@ 21399,7 +21434,7 @@ Various `.c', `.y', and `.h' files
`missing_d/*'
`m4/*'
These files and subdirectories are used when configuring `gawk'
 for various Unix systems. They are explained in *Note Unix
+ for various Unix systems. They are explained in *note Unix
Installation::.
`po/*'
@@ 21414,8 +21449,8 @@ Various `.c', `.y', and `.h' files
programs from the Texinfo source file for this Info file. It also
contains a `Makefile.in' file, which `configure' uses to generate
a `Makefile'. `Makefile.am' is used by GNU Automake to create
 `Makefile.in'. The library functions from *Note Library
 Functions::, and the `igawk' program from *Note Igawk Program::,
+ `Makefile.in'. The library functions from *note Library
+ Functions::, and the `igawk' program from *note Igawk Program::,
are included as readytouse files in the `gawk' distribution.
They are installed as part of the installation process. The rest
of the programs in this Info file are available in appropriate
@@ 21780,7 +21815,7 @@ MSDOS or MSWindows. EMX (OS/2 only) does support at
least the `&'
operator.
The MSDOS and MSWindows versions of `gawk' search for program
files as described in *Note AWKPATH Variable::. However, semicolons
+files as described in *note AWKPATH Variable::. However, semicolons
(rather than colons) separate elements in the `AWKPATH' variable. If
`AWKPATH' is not set or is empty, then the default search path for
MSWindows and MSDOS versions is `".;c:/lib/awk;c:/gnu/lib/awk"'.
@@ 22315,7 +22350,7 @@ File: gawk.info, Node: Accessing The Source, Next:
Adding Code, Up: Additions
C.2.1 Accessing The `gawk' Git Repository

As `gawk' is Free Software, the source code is always available. *Note
+As `gawk' is Free Software, the source code is always available. *note
Gawk Distribution::, describes how to get and build the formal,
released versions of `gawk'.
@@ 22335,7 +22370,7 @@ access the repository using:
git clone http://git.savannah.gnu.org/r/gawk.git
Once you have made changes, you can use `git diff' to produce a
patch, and send that to the `gawk' maintainer; see *Note Bugs:: for how
+patch, and send that to the `gawk' maintainer; see *note Bugs:: for how
to do that.
Finally, if you cannot install Git (e.g., if it hasn't been ported
@@ 22484,7 +22519,7 @@ C.2.3 Porting `gawk' to a New Operating System
If you want to port `gawk' to a new operating system, there are several
steps:
 1. Follow the guidelines in *Note Adding Code::, concerning coding
+ 1. Follow the guidelines in *note Adding Code::, concerning coding
style, submission of diffs, and so on.
2. Be prepared to sign the appropriate paperwork. In order for the
@@ 23438,7 +23473,7 @@ larger range of values. The disadvantage is that there
are numbers
that they cannot represent exactly. `awk' uses "double precision"
floatingpoint numbers, which can hold more digits than "single
precision" floatingpoint numbers. Floatingpoint issues are discussed
more fully in *Note Floating Point Issues::.
+more fully in *note Floating Point Issues::.
At the very lowest level, computers store values as groups of binary
digits, or "bits". Modern computers group bits into groups of eight,
@@ 23461,7 +23496,7 @@ or "binary", base 8 or "octal", and base 16 or
"hexadecimal". In
binary, each column represents two times the value in the column to its
right. Each column may contain either a 0 or a 1. Thus, binary 1010
represents 1 times 8, plus 0 times 4, plus 1 times 2, plus 0 times 1,
or decimal 10. Octal and hexadecimal are discussed more in *Note
+or decimal 10. Octal and hexadecimal are discussed more in *note
Nondecimalnumbers::.
Programs are written in programming languages. Hundreds, if not
@@ 23778,7 +23813,7 @@ Bit
floatingpoint numbers, character data, addresses of other memory
objects, or other data. `awk' lets you work with floatingpoint
numbers and strings. `gawk' lets you manipulate bit values with
 the builtin functions described in *Note Bitwise Functions::.
+ the builtin functions described in *note Bitwise Functions::.
Computers are often defined by how many bits they use to represent
integer values. Typical systems are 32bit systems, but 64bit
@@ 23961,7 +23996,7 @@ Field
builtin variable `FIELDWIDTHS' to describe their lengths. If you
wish to specify the contents of fields instead of the field
separator, you can use the builtin variable `FPAT' to do so.
 (*Note Field Separators::, *Note Constant Size::, and *Note
+ (*Note Field Separators::, *note Constant Size::, and *note
Splitting By Content::.)
Flag
@@ 24196,7 +24231,7 @@ Redirection
`', and `&' operators. You can redirect the output of the
`print' and `printf' statements to a file or a system command,
using the `>', `>>', `', and `&' operators. (*Note Getline::,
 and *Note Redirection::.)
+ and *note Redirection::.)
Regexp
See "Regular Expression."
@@ 25589,7 +25624,7 @@ Index
* * (asterisk), * operator, as regexp operator: Regexp Operators.
(line 87)
* * (asterisk), * operator, null strings, matching: Gory Details.
 (line 163)
+ (line 164)
* * (asterisk), ** operator <1>: Precedence. (line 49)
* * (asterisk), ** operator: Arithmetic Ops. (line 81)
* * (asterisk), **= operator <1>: Precedence. (line 95)
@@ 25834,7 +25869,7 @@ Index
(line 23)
* advanced features, network connections, See Also networks, connections:
Advanced Features.
(line 6)
* advanced features, null strings, matching: Gory Details. (line 163)
+* advanced features, null strings, matching: Gory Details. (line 164)
* advanced features, operators, precedence: Increment Ops. (line 61)
* advanced features, piping into sh: Redirection. (line 143)
* advanced features, regexp constants: Assignment Ops. (line 148)
@@ 25933,7 +25968,7 @@ Index
* asterisk (*), * operator, as regexp operator: Regexp Operators.
(line 87)
* asterisk (*), * operator, null strings, matching: Gory Details.
 (line 163)
+ (line 164)
* asterisk (*), ** operator <1>: Precedence. (line 49)
* asterisk (*), ** operator: Arithmetic Ops. (line 81)
* asterisk (*), **= operator <1>: Precedence. (line 95)
@@ 26911,7 +26946,7 @@ Index
(line 44)
* functions, userdefined, next/nextfile statements and: Next Statement.
(line 45)
* Gd: Acknowledgments. (line 81)
+* Gd: Acknowledgments. (line 83)
* Garfinkle, Scott: Contributors. (line 35)
* gawk program, dynamic profiling: Profiling. (line 171)
* gawk, ARGIND variable in: Other Arguments. (line 12)
@@ 27254,7 +27289,7 @@ Index
* Kernighan, Brian <3>: Contributors. (line 12)
* Kernighan, Brian <4>: BTL. (line 6)
* Kernighan, Brian <5>: Concatenation. (line 6)
* Kernighan, Brian <6>: Acknowledgments. (line 75)
+* Kernighan, Brian <6>: Acknowledgments. (line 77)
* Kernighan, Brian <7>: Conventions. (line 34)
* Kernighan, Brian: History. (line 17)
* kill command, dynamic profiling: Profiling. (line 180)
@@ 27378,7 +27413,7 @@ Index
* matching, expressions, See comparison expressions: Typing and Comparison.
(line 9)
* matching, leftmost longest: Multiple Line. (line 26)
* matching, null strings: Gory Details. (line 163)
+* matching, null strings: Gory Details. (line 164)
* mawk program: Other Versions. (line 35)
* McPhee, Patrick: Contributors. (line 100)
* memory, releasing: Internals. (line 92)
@@ 27463,7 +27498,7 @@ Index
* null strings, as array subscripts: Uninitialized Subscripts.
(line 43)
* null strings, converting numbers to strings: Conversion. (line 21)
* null strings, matching: Gory Details. (line 163)
+* null strings, matching: Gory Details. (line 164)
* null strings, quoting and: Quoting. (line 62)
* number sign (#), #! (executable scripts): Executable Scripts.
(line 6)
@@ 27676,7 +27711,7 @@ Index
* POSIX awk, field separators and: Fields. (line 6)
* POSIX awk, FS variable and: Usermodified. (line 66)
* POSIX awk, function keyword in: Definition Syntax. (line 83)
* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 53)
+* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 54)
* POSIX awk, functions and, length(): String Functions. (line 175)
* POSIX awk, GNU long options and: Options. (line 15)
* POSIX awk, interval expressions in: Regexp Operators. (line 135)
@@ 27900,11 +27935,11 @@ Index
* Robbins, Arnold: Command Line Field Separator.
(line 80)
* Robbins, Bill: Getline/Pipe. (line 36)
* Robbins, Harry: Acknowledgments. (line 81)
* Robbins, Jean: Acknowledgments. (line 81)
+* Robbins, Harry: Acknowledgments. (line 83)
+* Robbins, Jean: Acknowledgments. (line 83)
* Robbins, Miriam <1>: Passwd Functions. (line 90)
* Robbins, Miriam <2>: Getline/Pipe. (line 36)
* Robbins, Miriam: Acknowledgments. (line 81)
+* Robbins, Miriam: Acknowledgments. (line 83)
* Robinson, Will: Dynamic Extensions. (line 6)
* robot, the: Dynamic Extensions. (line 6)
* Rommel, Kai Uwe: Contributors. (line 43)
@@ 28366,440 +28401,440 @@ Index
Tag Table:
Node: Top1345
Node: Foreword31511
Node: Preface35856
Ref: PrefaceFootnote138909
Ref: PrefaceFootnote239015
Node: History39247
Node: Names41638
Ref: NamesFootnote143115
Node: This Manual43187
Ref: This ManualFootnote148125
Node: Conventions48225
Node: Manual History50359
Ref: Manual HistoryFootnote153629
Ref: Manual HistoryFootnote253670
Node: How To Contribute53744
Node: Acknowledgments54888
Node: Getting Started59219
Node: Running gawk61598
Node: Oneshot62784
Node: Read Terminal64009
Ref: Read TerminalFootnote165659
Ref: Read TerminalFootnote265935
Node: Long66106
Node: Executable Scripts67482
Ref: Executable ScriptsFootnote169351
Ref: Executable ScriptsFootnote269453
Node: Comments69904
Node: Quoting72371
Node: DOS Quoting76994
Node: Sample Data Files77669
Node: Very Simple80701
Node: Two Rules85300
Node: More Complex87447
Ref: More ComplexFootnote190377
Node: Statements/Lines90462
Ref: Statements/LinesFootnote194924
Node: Other Features95189
Node: When96117
Node: Invoking Gawk98264
Node: Command Line99649
Node: Options100432
Ref: OptionsFootnote1114802
Node: Other Arguments114827
Node: Naming Standard Input117485
Node: Environment Variables118579
Node: AWKPATH Variable119023
Ref: AWKPATH VariableFootnote1121620
Node: Other Environment Variables121880
Node: Exit Status124372
Node: Include Files125047
Node: Obsolete128532
Node: Undocumented129218
Node: Regexp129459
Node: Regexp Usage130848
Node: Escape Sequences132874
Node: Regexp Operators138637
Ref: Regexp OperatorsFootnote1145834
Ref: Regexp OperatorsFootnote2145981
Node: Bracket Expressions146079
Ref: tablecharclasses147969
Node: GNU Regexp Operators150492
Node: Casesensitivity154215
Ref: CasesensitivityFootnote1157183
Ref: CasesensitivityFootnote2157418
Node: Leftmost Longest157526
Node: Computed Regexps158727
Node: Reading Files162137
Node: Records164141
Ref: RecordsFootnote1172815
Node: Fields172852
Ref: FieldsFootnote1175885
Node: Nonconstant Fields175971
Node: Changing Fields178173
Node: Field Separators184154
Node: Default Field Splitting186783
Node: Regexp Field Splitting187900
Node: Single Character Fields191242
Node: Command Line Field Separator192301
Node: Field Splitting Summary195742
Ref: Field Splitting SummaryFootnote1198934
Node: Constant Size199035
Node: Splitting By Content203619
Ref: Splitting By ContentFootnote1207345
Node: Multiple Line207385
Ref: Multiple LineFootnote1213232
Node: Getline213411
Node: Plain Getline215627
Node: Getline/Variable217716
Node: Getline/File218857
Node: Getline/Variable/File220179
Ref: Getline/Variable/FileFootnote1221778
Node: Getline/Pipe221865
Node: Getline/Variable/Pipe224425
Node: Getline/Coprocess225532
Node: Getline/Variable/Coprocess226775
Node: Getline Notes227489
Node: Getline Summary229431
Ref: tablegetlinevariants229774
Node: Read Timeout230630
Ref: Read TimeoutFootnote1234375
Node: Command line directories234432
Node: Printing235062
Node: Print236693
Node: Print Examples238030
Node: Output Separators240814
Node: OFMT242574
Node: Printf243932
Node: Basic Printf244838
Node: Control Letters246377
Node: Format Modifiers250189
Node: Printf Examples256198
Node: Redirection258913
Node: Special Files265897
Node: Special FD266430
Ref: Special FDFootnote1270055
Node: Special Network270129
Node: Special Caveats270979
Node: Close Files And Pipes271775
Ref: Close Files And PipesFootnote1278798
Ref: Close Files And PipesFootnote2278946
Node: Expressions279096
Node: Values280228
Node: Constants280904
Node: Scalar Constants281584
Ref: Scalar ConstantsFootnote1282443
Node: Nondecimalnumbers282625
Node: Regexp Constants285684
Node: Using Constant Regexps286159
Node: Variables289214
Node: Using Variables289869
Node: Assignment Options291593
Node: Conversion293465
Ref: tablelocaleaffects298841
Ref: ConversionFootnote1299465
Node: All Operators299574
Node: Arithmetic Ops300204
Node: Concatenation302709
Ref: ConcatenationFootnote1305502
Node: Assignment Ops305622
Ref: tableassignops310610
Node: Increment Ops312018
Node: Truth Values and Conditions315488
Node: Truth Values316571
Node: Typing and Comparison317620
Node: Variable Typing318409
Ref: Variable TypingFootnote1322306
Node: Comparison Operators322428
Ref: tablerelationalops322838
Node: POSIX String Comparison326387
Ref: POSIX String ComparisonFootnote1327343
Node: Boolean Ops327481
Ref: Boolean OpsFootnote1331559
Node: Conditional Exp331650
Node: Function Calls333382
Node: Precedence336976
Node: Locales340645
Node: Patterns and Actions341734
Node: Pattern Overview342788
Node: Regexp Patterns344457
Node: Expression Patterns345000
Node: Ranges348685
Node: BEGIN/END351651
Node: Using BEGIN/END352413
Ref: Using BEGIN/ENDFootnote1355144
Node: I/O And BEGIN/END355250
Node: BEGINFILE/ENDFILE357532
Node: Empty360425
Node: Using Shell Variables360741
Node: Action Overview363026
Node: Statements365383
Node: If Statement367237
Node: While Statement368736
Node: Do Statement370780
Node: For Statement371936
Node: Switch Statement375088
Node: Break Statement377185
Node: Continue Statement379175
Node: Next Statement380968
Node: Nextfile Statement383358
Node: Exit Statement385903
Node: Builtin Variables388319
Node: Usermodified389414
Ref: UsermodifiedFootnote1397765
Node: Autoset397827
Ref: AutosetFootnote1407673
Node: ARGC and ARGV407878
Node: Arrays411729
Node: Array Basics413234
Node: Array Intro414060
Node: Reference to Elements418378
Node: Assigning Elements420648
Node: Array Example421139
Node: Scanning an Array422871
Node: Controlling Scanning425185
Ref: Controlling ScanningFootnote1430118
Node: Delete430434
Ref: DeleteFootnote1432869
Node: Numeric Array Subscripts432926
Node: Uninitialized Subscripts435109
Node: Multidimensional436737
Node: Multiscanning439831
Node: Arrays of Arrays441422
Node: Functions446067
Node: Builtin446889
Node: Calling Builtin447967
Node: Numeric Functions449955
Ref: Numeric FunctionsFootnote1453720
Ref: Numeric FunctionsFootnote2454077
Ref: Numeric FunctionsFootnote3454125
Node: String Functions454394
Ref: String FunctionsFootnote1477891
Ref: String FunctionsFootnote2478020
Ref: String FunctionsFootnote3478268
Node: Gory Details478355
Ref: tablesubescapes480034
Ref: tablesubposix92481388
Ref: tablesubproposed482731
Ref: tableposixsub484081
Ref: tablegensubescapes485627
Ref: Gory DetailsFootnote1486834
Ref: Gory DetailsFootnote2486885
Node: I/O Functions487036
Ref: I/O FunctionsFootnote1493691
Node: Time Functions493838
Ref: Time FunctionsFootnote1504730
Ref: Time FunctionsFootnote2504798
Ref: Time FunctionsFootnote3504956
Ref: Time FunctionsFootnote4505067
Ref: Time FunctionsFootnote5505179
Ref: Time FunctionsFootnote6505406
Node: Bitwise Functions505672
Ref: tablebitwiseops506230
Ref: Bitwise FunctionsFootnote1510390
Node: Type Functions510574
Node: I18N Functions511044
Node: Userdefined512671
Node: Definition Syntax513475
Ref: Definition SyntaxFootnote1518385
Node: Function Example518454
Node: Function Caveats521048
Node: Calling A Function521469
Node: Variable Scope522584
Node: Pass By Value/Reference524559
Node: Return Statement527999
Node: Dynamic Typing530980
Node: Indirect Calls531715
Node: Internationalization541400
Node: I18N and L10N542839
Node: Explaining gettext543525
Ref: Explaining gettextFootnote1548591
Ref: Explaining gettextFootnote2548775
Node: Programmer i18n548940
Node: Translator i18n553140
Node: String Extraction553933
Ref: String ExtractionFootnote1554894
Node: Printf Ordering554980
Ref: Printf OrderingFootnote1557764
Node: I18N Portability557828
Ref: I18N PortabilityFootnote1560277
Node: I18N Example560340
Ref: I18N ExampleFootnote1562975
Node: Gawk I18N563047
Node: Arbitrary Precision Arithmetic563664
Ref: Arbitrary Precision ArithmeticFootnote1566476
Node: Floatingpoint Programming566617
Node: Floatingpoint Representation571208
Node: Floatingpoint Context572274
Ref: tableieeeformats573109
Node: Rounding Mode574433
Ref: tableroundingmodes574941
Ref: Rounding ModeFootnote1578147
Node: Arbitrary Precision Floats578328
Ref: Arbitrary Precision FloatsFootnote1580402
Node: Setting Precision580704
Node: Setting Rounding Mode583404
Node: Floatingpoint Constants584307
Node: Changing Precision585721
Ref: Changing PrecisionFootnote1587104
Node: Exact Arithmetic587274
Node: Integer Programming590172
Node: Arbitrary Precision Integers591918
Node: MPFR and GMP Libraries594827
Node: Advanced Features595190
Node: Nondecimal Data596713
Node: Array Sorting598296
Node: Controlling Array Traversal598993
Node: Array Sorting Functions607230
Ref: Array Sorting FunctionsFootnote1610904
Ref: Array Sorting FunctionsFootnote2610997
Node: Twoway I/O611191
Ref: Twoway I/OFootnote1616623
Node: TCP/IP Networking616693
Node: Profiling619537
Node: Library Functions626991
Ref: Library FunctionsFootnote1629998
Node: Library Names630169
Ref: Library NamesFootnote1633640
Ref: Library NamesFootnote2633860
Node: General Functions633946
Node: Strtonum Function634899
Node: Assert Function637829
Node: Round Function641155
Node: Cliff Random Function642698
Node: Ordinal Functions643714
Ref: Ordinal FunctionsFootnote1646784
Ref: Ordinal FunctionsFootnote2647036
Node: Join Function647245
Ref: Join FunctionFootnote1649016
Node: Gettimeofday Function649216
Node: Data File Management652931
Node: Filetrans Function653563
Node: Rewind Function657702
Node: File Checking659089
Node: Empty Files660183
Node: Ignoring Assigns662413
Node: Getopt Function663966
Ref: Getopt FunctionFootnote1675270
Node: Passwd Functions675473
Ref: Passwd FunctionsFootnote1684448
Node: Group Functions684536
Node: Walking Arrays692620
Node: Sample Programs694189
Node: Running Examples694854
Node: Clones695582
Node: Cut Program696806
Node: Egrep Program706651
Ref: Egrep ProgramFootnote1714424
Node: Id Program714534
Node: Split Program718150
Ref: Split ProgramFootnote1721669
Node: Tee Program721797
Node: Uniq Program724600
Node: Wc Program732029
Ref: Wc ProgramFootnote1736295
Ref: Wc ProgramFootnote2736495
Node: Miscellaneous Programs736587
Node: Dupword Program737775
Node: Alarm Program739806
Node: Translate Program744555
Ref: Translate ProgramFootnote1748942
Ref: Translate ProgramFootnote2749170
Node: Labels Program749304
Ref: Labels ProgramFootnote1752675
Node: Word Sorting752759
Node: History Sorting756643
Node: Extract Program758482
Ref: Extract ProgramFootnote1765965
Node: Simple Sed766093
Node: Igawk Program769155
Ref: Igawk ProgramFootnote1784312
Ref: Igawk ProgramFootnote2784513
Node: Anagram Program784651
Node: Signature Program787719
Node: Debugger788819
Node: Debugging789771
Node: Debugging Concepts790204
Node: Debugging Terms792060
Node: Awk Debugging794657
Node: Sample Debugging Session795549
Node: Debugger Invocation796069
Node: Finding The Bug797398
Node: List of Debugger Commands803886
Node: Breakpoint Control805220
Node: Debugger Execution Control808884
Node: Viewing And Changing Data812244
Node: Execution Stack815600
Node: Debugger Info817067
Node: Miscellaneous Debugger Commands821048
Node: Readline Support826493
Node: Limitations827324
Node: Language History829576
Node: V7/SVR3.1831088
Node: SVR4833409
Node: POSIX834851
Node: BTL835859
Node: POSIX/GNU836593
Node: Common Extensions841744
Node: Ranges and Locales842851
Ref: Ranges and LocalesFootnote1847455
Node: Contributors847676
Node: Installation851937
Node: Gawk Distribution852831
Node: Getting853315
Node: Extracting854141
Node: Distribution contents855833
Node: Unix Installation861055
Node: Quick Installation861672
Node: Additional Configuration Options863634
Node: Configuration Philosophy865111
Node: NonUnix Installation867453
Node: PC Installation867911
Node: PC Binary Installation869210
Node: PC Compiling871058
Node: PC Testing874002
Node: PC Using875178
Node: Cygwin879363
Node: MSYS880363
Node: VMS Installation880877
Node: VMS Compilation881480
Ref: VMS CompilationFootnote1882487
Node: VMS Installation Details882545
Node: VMS Running884180
Node: VMS Old Gawk885787
Node: Bugs886261
Node: Other Versions890113
Node: Notes895428
Node: Compatibility Mode896120
Node: Additions896903
Node: Accessing The Source897715
Node: Adding Code899140
Node: New Ports905107
Node: Dynamic Extensions909220
Node: Internals910660
Node: Plugin License919179
Node: Loading Extensions919817
Node: Sample Library921627
Node: Internal File Description922317
Node: Internal File Ops926032
Ref: Internal File OpsFootnote1930756
Node: Using Internal File Ops930896
Node: Future Extensions933273
Node: Basic Concepts935777
Node: Basic High Level936534
Ref: Basic High LevelFootnote1940569
Node: Basic Data Typing940754
Node: Floating Point Issues945279
Node: String Conversion Precision946362
Ref: String Conversion PrecisionFootnote1948062
Node: Unexpected Results948171
Node: POSIX Floating Point Problems949997
Ref: POSIX Floating Point ProblemsFootnote1953702
Node: Glossary953740
Node: Copying978716
Node: GNU Free Documentation License1016273
Node: Index1041410
+Node: Top1346
+Node: Foreword31547
+Node: Preface35892
+Ref: PrefaceFootnote138945
+Ref: PrefaceFootnote239051
+Node: History39283
+Node: Names41674
+Ref: NamesFootnote143151
+Node: This Manual43223
+Ref: This ManualFootnote148161
+Node: Conventions48261
+Node: Manual History50395
+Ref: Manual HistoryFootnote153665
+Ref: Manual HistoryFootnote253706
+Node: How To Contribute53780
+Node: Acknowledgments54924
+Node: Getting Started59420
+Node: Running gawk61799
+Node: Oneshot62985
+Node: Read Terminal64210
+Ref: Read TerminalFootnote165860
+Ref: Read TerminalFootnote266136
+Node: Long66307
+Node: Executable Scripts67683
+Ref: Executable ScriptsFootnote169552
+Ref: Executable ScriptsFootnote269654
+Node: Comments70105
+Node: Quoting72572
+Node: DOS Quoting77195
+Node: Sample Data Files77870
+Node: Very Simple80902
+Node: Two Rules85501
+Node: More Complex87648
+Ref: More ComplexFootnote190578
+Node: Statements/Lines90663
+Ref: Statements/LinesFootnote195125
+Node: Other Features95390
+Node: When96318
+Node: Invoking Gawk98465
+Node: Command Line99850
+Node: Options100633
+Ref: OptionsFootnote1115003
+Node: Other Arguments115028
+Node: Naming Standard Input117686
+Node: Environment Variables118780
+Node: AWKPATH Variable119224
+Ref: AWKPATH VariableFootnote1121821
+Node: Other Environment Variables122081
+Node: Exit Status124573
+Node: Include Files125248
+Node: Obsolete128733
+Node: Undocumented129419
+Node: Regexp129660
+Node: Regexp Usage131049
+Node: Escape Sequences133075
+Node: Regexp Operators138838
+Ref: Regexp OperatorsFootnote1146035
+Ref: Regexp OperatorsFootnote2146182
+Node: Bracket Expressions146280
+Ref: tablecharclasses148170
+Node: GNU Regexp Operators150693
+Node: Casesensitivity154416
+Ref: CasesensitivityFootnote1157384
+Ref: CasesensitivityFootnote2157619
+Node: Leftmost Longest157727
+Node: Computed Regexps158928
+Node: Reading Files162338
+Node: Records164342
+Ref: RecordsFootnote1173016
+Node: Fields173053
+Ref: FieldsFootnote1176086
+Node: Nonconstant Fields176172
+Node: Changing Fields178374
+Node: Field Separators184355
+Node: Default Field Splitting186984
+Node: Regexp Field Splitting188101
+Node: Single Character Fields191443
+Node: Command Line Field Separator192502
+Node: Field Splitting Summary195943
+Ref: Field Splitting SummaryFootnote1199135
+Node: Constant Size199236
+Node: Splitting By Content203820
+Ref: Splitting By ContentFootnote1207546
+Node: Multiple Line207586
+Ref: Multiple LineFootnote1213433
+Node: Getline213612
+Node: Plain Getline215828
+Node: Getline/Variable217917
+Node: Getline/File219058
+Node: Getline/Variable/File220380
+Ref: Getline/Variable/FileFootnote1221979
+Node: Getline/Pipe222066
+Node: Getline/Variable/Pipe224626
+Node: Getline/Coprocess225733
+Node: Getline/Variable/Coprocess226976
+Node: Getline Notes227690
+Node: Getline Summary229632
+Ref: tablegetlinevariants229975
+Node: Read Timeout230831
+Ref: Read TimeoutFootnote1234576
+Node: Command line directories234633
+Node: Printing235263
+Node: Print236894
+Node: Print Examples238231
+Node: Output Separators241015
+Node: OFMT242775
+Node: Printf244133
+Node: Basic Printf245039
+Node: Control Letters246578
+Node: Format Modifiers250390
+Node: Printf Examples256399
+Node: Redirection259114
+Node: Special Files266098
+Node: Special FD266631
+Ref: Special FDFootnote1270256
+Node: Special Network270330
+Node: Special Caveats271180
+Node: Close Files And Pipes271976
+Ref: Close Files And PipesFootnote1278999
+Ref: Close Files And PipesFootnote2279147
+Node: Expressions279297
+Node: Values280429
+Node: Constants281105
+Node: Scalar Constants281785
+Ref: Scalar ConstantsFootnote1282644
+Node: Nondecimalnumbers282826
+Node: Regexp Constants285885
+Node: Using Constant Regexps286360
+Node: Variables289415
+Node: Using Variables290070
+Node: Assignment Options291794
+Node: Conversion293666
+Ref: tablelocaleaffects299042
+Ref: ConversionFootnote1299666
+Node: All Operators299775
+Node: Arithmetic Ops300405
+Node: Concatenation302910
+Ref: ConcatenationFootnote1305703
+Node: Assignment Ops305823
+Ref: tableassignops310811
+Node: Increment Ops312219
+Node: Truth Values and Conditions315689
+Node: Truth Values316772
+Node: Typing and Comparison317821
+Node: Variable Typing318610
+Ref: Variable TypingFootnote1322507
+Node: Comparison Operators322629
+Ref: tablerelationalops323039
+Node: POSIX String Comparison326588
+Ref: POSIX String ComparisonFootnote1327544
+Node: Boolean Ops327682
+Ref: Boolean OpsFootnote1331760
+Node: Conditional Exp331851
+Node: Function Calls333583
+Node: Precedence337177
+Node: Locales340846
+Node: Patterns and Actions341935
+Node: Pattern Overview342989
+Node: Regexp Patterns344658
+Node: Expression Patterns345201
+Node: Ranges348886
+Node: BEGIN/END351852
+Node: Using BEGIN/END352614
+Ref: Using BEGIN/ENDFootnote1355345
+Node: I/O And BEGIN/END355451
+Node: BEGINFILE/ENDFILE357733
+Node: Empty360626
+Node: Using Shell Variables360942
+Node: Action Overview363227
+Node: Statements365584
+Node: If Statement367438
+Node: While Statement368937
+Node: Do Statement370981
+Node: For Statement372137
+Node: Switch Statement375289
+Node: Break Statement377386
+Node: Continue Statement379376
+Node: Next Statement381169
+Node: Nextfile Statement383559
+Node: Exit Statement386104
+Node: Builtin Variables388520
+Node: Usermodified389615
+Ref: UsermodifiedFootnote1397968
+Node: Autoset398030
+Ref: AutosetFootnote1407876
+Node: ARGC and ARGV408081
+Node: Arrays411932
+Node: Array Basics413437
+Node: Array Intro414263
+Node: Reference to Elements418581
+Node: Assigning Elements420851
+Node: Array Example421342
+Node: Scanning an Array423074
+Node: Controlling Scanning425388
+Ref: Controlling ScanningFootnote1430321
+Node: Delete430637
+Ref: DeleteFootnote1433072
+Node: Numeric Array Subscripts433129
+Node: Uninitialized Subscripts435312
+Node: Multidimensional436940
+Node: Multiscanning440034
+Node: Arrays of Arrays441625
+Node: Functions446270
+Node: Builtin447092
+Node: Calling Builtin448170
+Node: Numeric Functions450158
+Ref: Numeric FunctionsFootnote1453923
+Ref: Numeric FunctionsFootnote2454280
+Ref: Numeric FunctionsFootnote3454328
+Node: String Functions454597
+Ref: String FunctionsFootnote1478094
+Ref: String FunctionsFootnote2478223
+Ref: String FunctionsFootnote3478471
+Node: Gory Details478558
+Ref: tablesubescapes480237
+Ref: tablesubposix92481591
+Ref: tablesubproposed482934
+Ref: tableposixsub484284
+Ref: tablegensubescapes485830
+Ref: Gory DetailsFootnote1487037
+Ref: Gory DetailsFootnote2487088
+Node: I/O Functions487239
+Ref: I/O FunctionsFootnote1493894
+Node: Time Functions494041
+Ref: Time FunctionsFootnote1504933
+Ref: Time FunctionsFootnote2505001
+Ref: Time FunctionsFootnote3505159
+Ref: Time FunctionsFootnote4505270
+Ref: Time FunctionsFootnote5505382
+Ref: Time FunctionsFootnote6505609
+Node: Bitwise Functions505875
+Ref: tablebitwiseops506433
+Ref: Bitwise FunctionsFootnote1510593
+Node: Type Functions510777
+Node: I18N Functions511247
+Node: Userdefined512874
+Node: Definition Syntax513678
+Ref: Definition SyntaxFootnote1518588
+Node: Function Example518657
+Node: Function Caveats521251
+Node: Calling A Function521672
+Node: Variable Scope522787
+Node: Pass By Value/Reference524762
+Node: Return Statement528202
+Node: Dynamic Typing531183
+Node: Indirect Calls531918
+Node: Internationalization541603
+Node: I18N and L10N543042
+Node: Explaining gettext543728
+Ref: Explaining gettextFootnote1548794
+Ref: Explaining gettextFootnote2548978
+Node: Programmer i18n549143
+Node: Translator i18n553343
+Node: String Extraction554136
+Ref: String ExtractionFootnote1555097
+Node: Printf Ordering555183
+Ref: Printf OrderingFootnote1557967
+Node: I18N Portability558031
+Ref: I18N PortabilityFootnote1560480
+Node: I18N Example560543
+Ref: I18N ExampleFootnote1563178
+Node: Gawk I18N563250
+Node: Arbitrary Precision Arithmetic563867
+Ref: Arbitrary Precision ArithmeticFootnote1566742
+Node: Floatingpoint Programming566890
+Node: Floatingpoint Representation571781
+Node: Floatingpoint Context572885
+Ref: tableieeeformats573720
+Node: Rounding Mode575045
+Ref: tableroundingmodes575670
+Ref: Rounding ModeFootnote1578791
+Node: Arbitrary Precision Floats578972
+Ref: Arbitrary Precision FloatsFootnote1581023
+Node: Setting Precision581334
+Node: Setting Rounding Mode584092
+Node: Floatingpoint Constants585001
+Node: Changing Precision586420
+Ref: Changing PrecisionFootnote1587792
+Node: Exact Arithmetic587965
+Node: Integer Programming590980
+Node: Arbitrary Precision Integers592760
+Node: MPFR and GMP Libraries595757
+Node: Advanced Features596142
+Node: Nondecimal Data597665
+Node: Array Sorting599248
+Node: Controlling Array Traversal599945
+Node: Array Sorting Functions608182
+Ref: Array Sorting FunctionsFootnote1611856
+Ref: Array Sorting FunctionsFootnote2611949
+Node: Twoway I/O612143
+Ref: Twoway I/OFootnote1617575
+Node: TCP/IP Networking617645
+Node: Profiling620489
+Node: Library Functions627943
+Ref: Library FunctionsFootnote1630950
+Node: Library Names631121
+Ref: Library NamesFootnote1634592
+Ref: Library NamesFootnote2634812
+Node: General Functions634898
+Node: Strtonum Function635851
+Node: Assert Function638781
+Node: Round Function642107
+Node: Cliff Random Function643650
+Node: Ordinal Functions644666
+Ref: Ordinal FunctionsFootnote1647736
+Ref: Ordinal FunctionsFootnote2647988
+Node: Join Function648197
+Ref: Join FunctionFootnote1649968
+Node: Gettimeofday Function650168
+Node: Data File Management653883
+Node: Filetrans Function654515
+Node: Rewind Function658654
+Node: File Checking660041
+Node: Empty Files661135
+Node: Ignoring Assigns663365
+Node: Getopt Function664918
+Ref: Getopt FunctionFootnote1676222
+Node: Passwd Functions676425
+Ref: Passwd FunctionsFootnote1685400
+Node: Group Functions685488
+Node: Walking Arrays693572
+Node: Sample Programs695141
+Node: Running Examples695806
+Node: Clones696534
+Node: Cut Program697758
+Node: Egrep Program707603
+Ref: Egrep ProgramFootnote1715376
+Node: Id Program715486
+Node: Split Program719102
+Ref: Split ProgramFootnote1722621
+Node: Tee Program722749
+Node: Uniq Program725552
+Node: Wc Program732981
+Ref: Wc ProgramFootnote1737247
+Ref: Wc ProgramFootnote2737447
+Node: Miscellaneous Programs737539
+Node: Dupword Program738727
+Node: Alarm Program740758
+Node: Translate Program745507
+Ref: Translate ProgramFootnote1749894
+Ref: Translate ProgramFootnote2750122
+Node: Labels Program750256
+Ref: Labels ProgramFootnote1753627
+Node: Word Sorting753711
+Node: History Sorting757595
+Node: Extract Program759434
+Ref: Extract ProgramFootnote1766917
+Node: Simple Sed767045
+Node: Igawk Program770107
+Ref: Igawk ProgramFootnote1785264
+Ref: Igawk ProgramFootnote2785465
+Node: Anagram Program785603
+Node: Signature Program788671
+Node: Debugger789771
+Node: Debugging790723
+Node: Debugging Concepts791156
+Node: Debugging Terms793012
+Node: Awk Debugging795609
+Node: Sample Debugging Session796501
+Node: Debugger Invocation797021
+Node: Finding The Bug798350
+Node: List of Debugger Commands804838
+Node: Breakpoint Control806172
+Node: Debugger Execution Control809836
+Node: Viewing And Changing Data813196
+Node: Execution Stack816552
+Node: Debugger Info818019
+Node: Miscellaneous Debugger Commands822000
+Node: Readline Support827445
+Node: Limitations828276
+Node: Language History830528
+Node: V7/SVR3.1832040
+Node: SVR4834361
+Node: POSIX835803
+Node: BTL836811
+Node: POSIX/GNU837545
+Node: Common Extensions842696
+Node: Ranges and Locales843803
+Ref: Ranges and LocalesFootnote1848407
+Node: Contributors848628
+Node: Installation852889
+Node: Gawk Distribution853783
+Node: Getting854267
+Node: Extracting855093
+Node: Distribution contents856785
+Node: Unix Installation862007
+Node: Quick Installation862624
+Node: Additional Configuration Options864586
+Node: Configuration Philosophy866063
+Node: NonUnix Installation868405
+Node: PC Installation868863
+Node: PC Binary Installation870162
+Node: PC Compiling872010
+Node: PC Testing874954
+Node: PC Using876130
+Node: Cygwin880315
+Node: MSYS881315
+Node: VMS Installation881829
+Node: VMS Compilation882432
+Ref: VMS CompilationFootnote1883439
+Node: VMS Installation Details883497
+Node: VMS Running885132
+Node: VMS Old Gawk886739
+Node: Bugs887213
+Node: Other Versions891065
+Node: Notes896380
+Node: Compatibility Mode897072
+Node: Additions897855
+Node: Accessing The Source898667
+Node: Adding Code900092
+Node: New Ports906059
+Node: Dynamic Extensions910172
+Node: Internals911612
+Node: Plugin License920131
+Node: Loading Extensions920769
+Node: Sample Library922579
+Node: Internal File Description923269
+Node: Internal File Ops926984
+Ref: Internal File OpsFootnote1931708
+Node: Using Internal File Ops931848
+Node: Future Extensions934225
+Node: Basic Concepts936729
+Node: Basic High Level937486
+Ref: Basic High LevelFootnote1941521
+Node: Basic Data Typing941706
+Node: Floating Point Issues946231
+Node: String Conversion Precision947314
+Ref: String Conversion PrecisionFootnote1949014
+Node: Unexpected Results949123
+Node: POSIX Floating Point Problems950949
+Ref: POSIX Floating Point ProblemsFootnote1954654
+Node: Glossary954692
+Node: Copying979668
+Node: GNU Free Documentation License1017225
+Node: Index1042362
End Tag Table
diff git a/doc/gawk.texi b/doc/gawk.texi
index c8a0db6..d1a35d2 100644
 a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ 79,9 +79,11 @@
@c some special symbols
@iftex
@set LEQ @address@hidden
address@hidden PI @address@hidden
@end iftex
@ifnottex
@set LEQ <=
address@hidden PI @i{pi}
@end ifnottex
@ifnottex
@@ 285,7 +287,8 @@ particular records in a file and perform operations upon
them.
* Functions:: Builtin and userdefined functions.
* Internationalization:: Getting @command{gawk} to speak your
language.
* Arbitrary Precision Arithmetic:: Arbitrary precision arithmetic with
@command{gawk}.
+* Arbitrary Precision Arithmetic:: Arbitrary precision arithmetic with
+ @command{gawk}.
* Advanced Features:: Stuff for advanced users, specific to
@command{gawk}.
* Library Functions:: A Library of @command{awk} Functions.
@@ 1611,10 +1614,13 @@ has been and continues to be a pleasure working with
this team of fine
people.
John Haque contributed the modifications to convert @command{gawk}
into a bytecode interpreter, including the debugger. Stephen Davies
+into a bytecode interpreter, including the debugger, and the
+additional modifications for support of arbitrary precision arithmetic.
+Stephen Davies
contributed to the effort to bring the bytecode changes into the mainstream
code base.
Efraim Yawitz contributed the initial text of @ref{Debugger}.
+John Haque contributed the initial text of @ref{Arbitrary Precision
Arithmetic}.
@cindex Kernighan, Brian
I would like to thank Brian Kernighan for invaluable assistance during the
@@ 12627,13 +12633,14 @@ character. (@xref{Output Separators}.)
@cindex @code{PREC} variable
@item PREC #
The working precision of arbitrary precision floatingpoint numbers,
53 by default. (@xref{Setting Precision}.)
+53 by default (@pxref{Setting Precision}).
@cindex @code{RNDMODE} variable
@item RNDMODE #
The rounding mode to use for arbitrary precision arithmetic on
numbers, by default @code{"N"} (@samp{roundTiesToEven} in IEEE754 standard).
(@xref{Setting Rounding Mode}.)
+numbers, by default @code{"N"} (@samp{roundTiesToEven} in
+the IEEE754 standard)
+(@pxref{Setting Rounding Mode}).
@cindex @code{RS} variable
@cindex separators, for records
@@ 18364,17 +18371,16 @@ to believe. Novice computer users solve this problem
by implicitly trusting
in the computer as an infallible authority; they tend to believe that all
digits of a printed answer are significant. Disillusioned computer users have
just the opposite approach; they are constantly afraid that their answers
are almost address@hidden
Donald E. Knuth. The Art of Computer Programming. Volume 2,
Seminumerical Algorithms, 3rd edition, 1998, ISBN 0201896834, p. 229.
}
+are almost meaningless.}
Donald Knuth
+Donald address@hidden E.@: Knuth.
address@hidden Art of Computer Programming}. Volume 2,
address@hidden Algorithms}, third edition,
+1998, ISBN 0201896834, p.@: 229.}
@end quotation

This section is about how to use the arbitrary precision
(also known as multiple precision or infinite precision) numeric
+This @value{SECTION} decsribes how to use the arbitrary precision
+(also known as @dfn{multiple precision} or @dfn{infinite precision}) numeric
capabilites in @command{gawk} to produce maximally accurate results
when you need it. But first you should check if your version of
@command{gawk} supports arbitrary precision arithmetic.
@@ 18385,12 +18391,17 @@ the following command:
$ @kbd{gawk version}
@print{} GNU Awk 4.1.0 (GNU MPFR 3.1.0, GNU MP 5.0.3)
@print{} Copyright (C) 1989, 19912012 Free Software Foundation.
..
address@hidden
@end example
Gawk uses the GNU MPFR and MP libraries for arbitrary precision arithmetic
on numbers. So if you do not see the names of these libraries in the output
above,
then your version of @command{gawk} does not support arbitrary precision math.
address@hidden uses the
address@hidden://www.mpfr.org, GNU MPFR}
+and
address@hidden://gmplib.org, GNU MP} (GMP)
+libraries for arbitrary precision
+arithmetic on numbers. So if you do not see the names of these libraries
+in the output, then your version of @command{gawk} does not support
+arbitrary precision arithmetic.
Even if you aren't interested in arbitrary precision arithmetic, you
may still benifit from knowing about how @command{gawk} handles numbers
@@ 18421,7 +18432,10 @@ in general, and the limitations of doing arithmetic
with ordinary
Numerical programming is an extensive area; if you need to develop
sophisticated numerical algorithms then @command{gawk} may not be
the ideal tool, and this documentation may not be sufficient.
address@hidden FIXME: JOHN: Do you want to cite some actual books?
It might require a book or two to communicate how to compute
address@hidden FIXME: JOHN: Please provide a definition for the terms
address@hidden accuracy and precision
with ideal accuracy and precision, and the result often depends
on the particular application.
@@ 18431,36 +18445,39 @@ binary floatingpoint numbers, and the limited
precision of
floatingpoint numbers means that slight changes in
the order of operations or the precision of intermediate storage
can change the result. To make matters worse with arbitrary precision
floatingpoint, one can set the precision before starting a computation,
and then one cannot be sure of the final result.
+floatingpoint, you can set the precision before starting a computation,
+but then you cannot be sure of the final result.
address@hidden FIXME: JOHN: Not clear what you mean by "cannot be sure of the
final result"
Sometimes you need to think more about what you really want
and what's really happening. Consider the two numbers
in the following example:
@example
 x = 0.875 # 1/2 + 1/4 + 1/8
 y = 0.425
+x = 0.875 # 1/2 + 1/4 + 1/8
+y = 0.425
@end example
Unlike the number in y, the number stored in x is exactly representable
+Unlike the number in @code{y}, the number stored in @code{x}
+is exactly representable
in binary since it can be written as a finite sum of one or
more fractions whose denominators are all powers of two.
When @command{gawk} reads a floatingpoint number from
a program source, it automatically rounds that number to whatever
precision that your machine supports. If you try to print the numeric
content of a variable using an output format string "%.17g",
+program source, it automatically rounds that number to whatever
+precision your machine supports. If you try to print the numeric
+content of a variable using an output format string of @code{"%.17g"},
it may not produce the same number as you assigned to it:
@example
$ @kbd{gawk 'BEGIN @{ printf("%0.17g, %0.17g\n", x, y) @}'}
+$ @kbd{gawk 'BEGIN @{ x = 0.875; y = 0.425}
+> @kbd{ printf("%0.17g, %0.17g\n", x, y) @}'}
@print{} 0.875, 0.42499999999999999
@end example
Often the error is so small you do not even notice it, and if you do,
you can always specify how much precision you would like in your output.
Usually this is a format string like "%.15g", which when
used in the example above will produce an output identical to the input.
+Usually this is a format string like @code{"%.15g"}, which when
+used in the previous example, produces an output identical to the input.
Because the underlying representation can be little bit off from the exact
value,
comparing floats to see if they are equal is generally not a good idea.
@@ 18475,11 +18492,10 @@ The loss of accuracy during a single computation with
floatingpoint numbers
usually isn't enough to worry about. However, if you compute a value
which is the result of a sequence of floating point operations,
the error can accumulate and greatly affect the computation itself.
Here is an attempt to compute the value of the constant @samp{pi} using one of
its many
series representations:
+Here is an attempt to compute the value of the constant
address@hidden using one of its many series representations:
@example
$ cat pi.awk
BEGIN @{
x = 1.0 / sqrt(3.0)
n = 6
@@ 18491,10 +18507,24 @@ BEGIN @{
@}
@end example
When run, the early errors propagating through later computations will
+When run, the early errors propagating through later computations
cause the loop to terminate prematurely after an attempt to divide by zero.
+
address@hidden
+$ @kbd{gawk f pi.awk}
address@hidden 3.215390309173475
address@hidden 3.159659942097510
address@hidden 3.146086215131467
address@hidden 3.142714599645573
address@hidden
address@hidden 3.224515243534819
address@hidden 2.791117213058638
address@hidden 0.000000000000000
address@hidden gawk: pi.awk:6: fatal: division by zero attempted
address@hidden example
+
Here is one more example where the inaccuracies in internal representations
yield unexpected result:
+yield an unexpected result:
@example
$ @kbd{gawk 'BEGIN @{}
@@ 18505,18 +18535,19 @@ $ @kbd{gawk 'BEGIN @{}
@print{} 4
@end example
Can computation using aribitrary precision help with the examples above?
If you are impatient to know,
address@hidden Arithmetic}.
+Can computation using aribitrary precision help with the previous examples?
+If you are impatient to know, see
address@hidden Arithmetic}.
+
Instead of aribitrary precision floatingpoint arithmetic,
often all you need is an adjustment of your logic
or different order for the operations in your calculation.
The stability and the accuracy of the computation of the constant @samp{pi}
in the example above can be enhanced by using the following
+or a different order for the operations in your calculation.
+The stability and the accuracy of the computation of the constant @value{PI}
+in the previous example can be enhanced by using the following
simple algebraic transformation:
@example
 (sqrt(x * x + 1)  1) / x = x / (sqrt(x * x + 1) + x)
+(sqrt(x * x + 1)  1) / x = x / (sqrt(x * x + 1) + x)
@end example
There is no need to be unduly suspicious about the results from
@@ 18536,20 +18567,37 @@ implies better precision than is actually the case.
Although floatingpoint representations vary from machine to machine,
the most commonly encountered representation is that defined by the
IEEE 754 Standard. An IEEE754 format has three components:
+IEEE 754 Standard. An IEEE754 format value has three components:
+
address@hidden @bullet
address@hidden
a sign bit telling whether the number is positive or negative,
an exponent giving its order of magnitude @var{e}, and a significand @var{s}
specifying the actual digits of the number. The value of the
number is then @var{s * 2^e}. The first bit of a nonzero binary significand
is always one so the significand in an IEEE754 format only includes the
fractional part leaving the leading one implicit.
+
address@hidden
+an @dfn{exponent} giving its order of magnitude, @var{e},
+
address@hidden
+and a @dfn{significand}, @var{s},
+specifying the actual digits of the number.
address@hidden itemize
+
+The value of the
+number is then
address@hidden
address@hidden @cdot 2^e}.
address@hidden iftex
address@hidden
address@hidden * 2^e}.
address@hidden ifnottex
+The first bit of a nonzero binary significand
+is always one, so the significand in an IEEE754 format only includes the
+fractional part, leaving the leading one implicit.
Three of the standard IEEE754 types are 32bit single precision,
64bit double precision and 128bit quadruple precision.
The standard also specifies extended precision formats
to allow greater precisions and larger exponent ranges.

@node Floatingpoint Context
@section Floatingpoint Context
@cindex context, floatingpoint
@@ 18578,9 +18626,9 @@ field values for the basic IEEE754 binary formats:
@caption{Basic IEEE Formats}
@multitable @columnfractions .20 .20 .20 .20 .20
@headitem Name @tab Total bits @tab Precision @tab emin @tab emax
address@hidden Single @tab 32 @tab 24 @tab 126 @tab +127
address@hidden Double @tab 64 @tab 53 @tab 1022 @tab +1023
address@hidden Quadruple @tab 128 @tab 113 @tab 16382 @tab +16383
address@hidden Single @tab 32 @tab 24 @tab @minus{}126 @tab +127
address@hidden Double @tab 64 @tab 53 @tab @minus{}1022 @tab +1023
address@hidden Quadruple @tab 128 @tab 113 @tab @minus{}16382 @tab +16383
@end multitable
@end float
@@ 18589,37 +18637,44 @@ The precision numbers include the implied leading one
that gives them
one extra bit of significand.
@end quotation
A floatingpoint context can also determine which signals are treated as
exceptions,
or can set rules for arithmetic with special values. The interested reader
should
consult the IEEE754 standard or other resources for details.

Gawk ordinarily uses the hardware double precision for a number.
On most systems, it is in IEEE754 floatingpoint format which corresponds
to 64bit binary with 53 bits of precision.
+A floatingpoint context can also determine which signals are treated
+as exceptions, and can set rules for arithmetic with special values.
+Please consult the IEEE754 standard or other resources for details.
address@hidden ordinarily uses the hardware double precision
+representation for numbers. On most systems, this is IEEE754
+floatingpoint format, corresponding to 64bit binary with 53 bits
+of precision.
@quotation NOTE
In case an underflow occurs, the standard allows, but does not require, the
smallest
normal number to loose precision gradually when an arithmetic operation is not
exactly zero but is too close to zero. Such numbers do not have as many
significant
digits as normal numbers, and are called denormals or subnormals.
The basic IEEE754 binary formats support subnormal numbers.
+In case an underflow occurs, the standard allows, but does not require,
+the smallest normal number to lose precision gradually when an arithmetic
address@hidden FIXME: JOHN: Do you mean "an arithmetic operation's result" ?
+operation is not exactly zero but is too close to zero.
address@hidden FIXME: JOHN: Too close to zero to what? or for what? Not clear.
+Such numbers do
+not have as many significant digits as normal numbers, and are called
address@hidden or @dfn{subnormals}. The basic IEEE754 binary formats
+support subnormal numbers.
@end quotation

@node Rounding Mode
@section Floatingpoint Rounding Mode
@cindex rounding mode, floatingpoint
Rounding mode specifies the behavior for the results of numerical operations
when
discarding extra precision. Each rounding mode indicates how the
least significant returned digit of a rounded result is to be calculated.
address@hidden lists the IEEE754 defined rounding modes:
+The @dfn{rounding mode} specifies the behavior for the results of numerical
+operations when discarding extra precision. Each rounding mode indicates
+how the least significant returned digit of a rounded result is to
+be calculated.
+The @code{RNDMODE} variable (@pxref{Setting Rounding Mode}) provides
+program level control over the rounding mode.
address@hidden lists the IEEE754 defined
+rounding modes:
@float Table,tableroundingmodes
@caption{Rounding Modes}
address@hidden @columnfractions .45 .25 .30
address@hidden Rounding Mode @tab IEEE Name @tab @code{RNDMODE} (@pxref{Setting
Rounding Mode})
address@hidden @columnfractions .45 .30 .25
address@hidden Rounding Mode @tab IEEE Name @tab @code{RNDMODE}
@item Round to nearest, ties to even @tab @code{roundTiesToEven} @tab
@code{"N"} or @code{"n"}
@item Round toward plus Infinity @tab @code{roundTowardPositive} @tab
@code{"U"} or @code{"u"}
@item Round toward negative Infinity @tab @code{roundTowardNegative} @tab
@code{"D"} or @code{"d"}
@@ 18633,8 +18688,9 @@ but the least intuitive. This method does the obvious
thing for most values,
by rounding them up or down to the nearest digit.
For example, rounding 1.132 to two digits yields 1.13,
and rounding 1.157 yields 1.16.
When it comes to rounding a value that is exactly halfway between,
it does not probably work the way you have learned in school.
+
+However, when it comes to rounding a value that is exactly halfway between,
+things do not work the way you probably learned in school.
In this case, the number is rounded to the nearest even digit.
So rounding 0.125 to two digits rounds down to 0.12,
but rounding 0.6875 to three digits rounds up to 0.688.
@@ 18653,8 +18709,8 @@ BEGIN @{
@end example
@noindent
produces the following output when address@hidden
It is possible for the output to be completely different if the
+produces the following output when address@hidden
+is possible for the output to be completely different if the
C library in your system does not use the IEEE754 evenrounding
rule to round halfway cases for @code{printf()}.}:
@@ 18677,8 +18733,8 @@ to cancel itself out. This is the default rounding mode
used
in IEEE754 computing functions and operators.
The other rounding modes are rarely used.
Round toward positive infinity @samp{roundTowardPositive}
and round toward negative infinity @samp{roundTowardNegative}
+Round toward positive infinity (@samp{roundTowardPositive})
+and round toward negative infinity (@samp{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 @samp{roundTowardZero}
@@ 18688,40 +18744,53 @@ nearest number and selects the number with the larger
magnitude
if a tie occurs.
Some numerical analysts will tell you that your choice of rounding style
has tremendous impact on the final outcome, and advice you to wait until
final output for any rounding. This goal can often be achieved by
+has tremendous impact on the final outcome, and advise you to wait until
+final output for any rounding. Instead, you can often achieve this goal by
setting the precision initially to some value sufficiently larger than
the final desired precision so that the accumulation of roundoff error
do not influence the outcome.
+the final desired precision, so that the accumulation of roundoff error
+does not influence the outcome.
If you suspect that results from your computation are
sensitive to accumulation of roundoff error,
one way to be sure is to look for significant difference in output
+one way to be sure is to look for a significant difference in output
when you change the rounding mode.

@node Arbitrary Precision Floats
@section Arbitrary Precision Floatingpoint Arithmetic with @command{gawk}
Gawk uses the GNU MPFR library for arbitrary precision floatingpoint
arithmetic.
The MPFR library provides precise control over precisions and rounding modes,
and gives correctly rounded reproducible platformindependent results.
With the commandline option @option{arbitraryprecision} or @option{M},
all floatingpoint
arithmetic operators and numeric functions can yield results to any
desired precision level supported by MPFR. Two builtin variables @code{PREC}
address@hidden uses the GNU MPFR library
+for arbitrary precision floatingpoint arithmetic. The MPFR library
+provides precise control over precisions and rounding modes, and gives
+correctly rounded reproducible platformindependent results. With the
+commandline option @option{arbitraryprecision} or @option{M},
+all floatingpoint arithmetic operators and numeric functions can yield
+results to any desired precision level supported by MPFR.
+Two builtin
+variables @code{PREC}
(@pxref{Setting Precision})
and @code{RNDMODE}
(@pxref{Setting Rounding Mode})
give a simple way of controlling the working precision and the rounding mode
in @command{gawk}.
The precision and the rounding mode are set globally for every operation to
follow.
The default working precision for arbitrary precision floats is address@hidden
default precision is 53, since according to the MPFR documentation, mpfr
should be able to exactly
reproduce all computations with doubleprecision machine floatingpoint
numbers (double type in C),
except the default exponent range is much wider and subnormal numbers are not
implemented.}
and the default value for @code{RNDMODE} is @code{"N"} which selects the
IEEE754
address@hidden (@pxref{Rounding Mode}) rounding mode.
The default exponent range in MPFR (@var{emax} = 2^30  1, @var{emin} =
address@hidden)
is used by @command{gawk} for all floatingpoint contexts.
There is no explicit mechanism in @command{gawk} to adjust the exponent range.
+provide control over the working precision and the rounding mode.
+The precision and the rounding mode are set globally for every operation
+to follow.
+
+The default working precision for arbitrary precision floats is 53,
+and the default value for @code{RNDMODE} is @code{"N"},
+which selects the IEEE754
address@hidden (@pxref{Rounding Mode}) rounding address@hidden
+default precision is 53, since according to the MPFR documentation,
+the library should be able to exactly reproduce all computations with
+doubleprecision machine floatingpoint numbers (@code{double} type
+in C), except the default exponent range is much wider and subnormal
+numbers are not implemented.}
address@hidden uses the default exponent range in MPFR
address@hidden
+(@math{emax = 2^{30}  1, emin = emax})
address@hidden iftex
address@hidden
+(@var{emax} = 2^30 @minus{} 1, @var{emin} = @address@hidden)
address@hidden ifnottex
+for all floatingpoint contexts.
+There is no explicit mechanism to adjust the exponent range.
MPFR does not implement subnormal numbers by default,
and this behavior cannot be changed in @command{gawk}.
@@ 18733,18 +18802,18 @@ gradual underflow (subnormal numbers).
@end quotation
@quotation NOTE
MPFR numbers are variablesize entities, consuming only as much space as
needed to store
the significant digits. Since the performance using MPFR numbers pales
compared to
doing math on the underlying machine types, you should consider only using as
much
precision as needed by your program.
+MPFR numbers are variablesize entities, consuming only as much space as
+needed to store the significant digits. Since the performance using MPFR
+numbers pales in comparison to doing math using the underlying machine
+types, you should consider using only as much precision as needed by
+your program.
@end quotation

@node Setting Precision
@section Setting the Working Precision
@cindex @code{PREC} variable
Gawk uses a global working precision; it does not keep track of
address@hidden uses a global working precision; it does not keep track of
the precision or accuracy of individual numbers. Performing an arithmetic
operation or calling a builtin function rounds the result to the current
working precision. The default working precision is 53 which can be
@@ 18752,7 +18821,7 @@ modified using the builtin variable @code{PREC}. You
can also set the
value to one of the following predefined caseinsensitive strings
to emulate an IEEE754 binary format:
address@hidden {double} {12345678901234567890123456789012345}
address@hidden address@hidden"double"}} {12345678901234567890123456789012345}
@headitem @code{PREC} @tab IEEE754 Binary Format
@item @code{"half"} @tab 16bit halfprecision.
@item @code{"single"} @tab Basic 32bit single precision.
@@ 18772,8 +18841,18 @@ $ @kbd{gawk M vPREC=100 'BEGIN @{ x = 1.0e400;
print x + 0; \}
@end example
Binary and decimal precisions are related approximately according to the
formula @code{prec = 3.322 * dps}, where @code{prec} denotes the binary
precision
(measured in bits) and @code{dps} (short for decimal places)
+formula:
+
address@hidden
address@hidden = 3.322 @cdot dps}
address@hidden iftex
address@hidden
address@hidden = 3.322 * @var{dps}
address@hidden ifnottex
+
address@hidden
+Here, @var{prec} denotes the binary precision
+(measured in bits) and @var{dps} (short for decimal places)
is the decimal digits. We can easily calculate how many decimal
digits the 53bit significand of an IEEE double is equivalent to:
53 / 3.332 which is equal to about 15.95.
@@ 18781,56 +18860,56 @@ But what does 15.95 digits actually mean? It depends
whether you are
concerned about how many digits you can rely on, or how many digits
you need.
It is important to know how many bits it takes to uniquely
identify a double. If you want to roundtrip from double to decimal and
back to double (saving a double representing an intermediate result
to a file, and later reading it back to restart the computation for instance)
then few more decimal digits are required. 17 digits will generally
be enough for a double.
+It is important to know how many bits it takes to uniquely identify
+a doubleprecision value (the C type @code{double}). If you want to
+convert from @code{double} to decimal and back to @code{double} (e.g.,
+saving a @code{double} representing an intermediate result to a file, and
+later reading it back to restart the computation), then a few more decimal
+digits are required. 17 digits is generally enough for a @code{double}.
It can also be important to know what decimal numbers can be uniquely
represented with a floatingpoint double. If you want to roundtrip
from decimal to double and back again, 15 is the most that
+represented with a @code{double}. If you want to convert
+from decimal to @code{double} and back again, 15 digits is the most that
you can get. Stated differently, you should not present
the numbers from your floatingpoint computations with more than 15
significant digits in them.
Conversely, it takes a precision of 332 bits to hold an approximation
of constant @samp{pi} that is accurate to 100 decimal places.
You should always add few extra bits in order to avoid confusing roundoff
+of constant @value{PI} that is accurate to 100 decimal places.
+You should always add some extra bits in order to avoid the confusing roundoff
issues that occur because numbers are stored internally in binary.

@node Setting Rounding Mode
@section Setting the Rounding Mode
@cindex @code{RNDMODE} variable
The builtin variable @code{RNDMODE} has the default value @code{"N"} which
selects
the IEEE754 rounding mode @samp{roundTiesToEven}.
+The builtin variable @code{RNDMODE} has the default value @code{"N"},
+which selects the IEEE754 rounding mode @samp{roundTiesToEven}.
The other possible values for @code{RNDMODE} are @code{"U"} for rounding mode
@samp{roundTowardPositive}, @code{"D"} for @samp{roundTowardNegative},
and @code{"Z"} for @samp{roundTowardZero}.
Gawk also accepts @code{"A"} to select the IEEE754 mode @samp{roundTiesToAway}
if the version of your MPFR library supports it, otherwise setting
address@hidden also accepts @code{"A"} to select the IEEE754 mode
address@hidden
+if your version of the MPFR library supports it; otherwise setting
@code{RNDMODE} to this value has no effect. @xref{Rounding Mode},
for the meanings of the various round modes.
+for the meanings of the various rounding modes.
Here is an example of how to change the default rounding behavior of
the @code{printf} output:
address@hidden's output:
@example
$ @kbd{gawk M vRNDMODE="Z" 'address@hidden printf("%.2f\n", 1.378)@}'}
+$ @kbd{gawk M vRNDMODE="Z" 'BEGIN @{ printf("%.2f\n", 1.378) @}'}
@print{} 1.37
@end example

@node Floatingpoint Constants
@section Representing Floatingpoint Constants
@cindex constants, floatingpoint
Be wary of floatingpoint constants! When reading a floatingpoint constant
from a program source, @command{gawk} uses the default precision, unless
overridden
by an assignment to the special variable @code{PREC} in the command
+from program source code, @command{gawk} uses the default precision,
+unless overridden
+by an assignment to the special variable @code{PREC} on the command
line, to store it internally as a MPFR number.
Changing the precision using @code{PREC} in the program text does
not change the precision of a constant. If you need to
@@ 18842,52 +18921,50 @@ illustrates the differences among various ways to
print a floatingpoint constant:
@example
$ @kbd{gawk M 'BEGIN @{ PREC=113; printf("%0.25f\n", 0.1) @}'}
+$ @kbd{gawk M 'BEGIN @{ PREC = 113; printf("%0.25f\n", 0.1) @}'}
@print{} 0.1000000000000000055511151
$ @kbd{gawk M vPREC=113 'BEGIN @{ printf("%0.25f\n", 0.1) @}'}
+$ @kbd{gawk M vPREC = 113 'BEGIN @{ printf("%0.25f\n", 0.1) @}'}
@print{} 0.1000000000000000000000000
$ @kbd{gawk M 'BEGIN @{ PREC=113; printf("%0.25f\n", "0.1") @}'}
+$ @kbd{gawk M 'BEGIN @{ PREC = 113; printf("%0.25f\n", "0.1") @}'}
@print{} 0.1000000000000000000000000
$ @kbd{gawk M 'BEGIN @{ PREC=113; printf("%0.25f\n", 1/10) @}'}
+$ @kbd{gawk M 'BEGIN @{ PREC = 113; printf("%0.25f\n", 1/10) @}'}
@print{} 0.1000000000000000000000000
@end example
In the first case above, the number is stored with the default precision of 53.

+In the first case, the number is stored with the default precision of 53.
@node Changing Precision
@section Changing the Precision of a Number
@cindex Laurie, Dirk
@quotation
address@hidden The point is that in any variableprecision package,
address@hidden point is that in any variableprecision package,
a decision is made on how to treat numbers given as data,
or arising in intermediate results, which are represented in
floatingpoint format to a precision lower than working precision.
Do we promote them to full membership of the highprecision club,
or do we treat them and all their associates as secondclass citizens?
Sometimes the first course is proper, sometimes the second, and it takes
careful analysis to tell address@hidden
Dirk Laurie. Variableprecision Arithmetic Considered Perilous  A Detective
Story.
Electronic Transactions on Numerical Analysis. Volume 28, pp. 168173, 2008.
}
+careful analysis to tell which.}
Dirk Laurie
+Dirk address@hidden Laurie.
address@hidden Arithmetic Considered Perilous  A Detective Story}.
+Electronic Transactions on Numerical Analysis. Volume 28, pp. 168173, 2008.}
@end quotation

Gawk does not implicitly modify the precision of any previously computed
results
when the working precision is changed with an assignment to @code{PREC} in the
program. The precision of a number is always the one that was used at the time
of its creation, and there is no way for the user to explicitly change it
thereafter. However, since the result of a floatingpoint arithmetic operation
is always an arbitrary precision float with a precision set by the value
of @code{PREC}, the following workaround will effectively accomplish
the same desired behavior:
address@hidden does not implicitly modify the precision of any previously
+computed results when the working precision is changed with an assignment
+to @code{PREC}. The precision of a number is always the one that was
+used at the time of its creation, and there is no way for the user
+to explicitly change it afterwards. However, since the result of a
+floatingpoint arithmetic operation is always an arbitrary precision
+floatingpoint valuewith a precision set by the value of @code{PREC}the
+following workaround effectively accomplishes the desired behavior:
@example
 x = x + 0.0
+x = x + 0.0
@end example
address@hidden FIXME: JOHN: Does += also work? I'd assume so...
@node Exact Arithmetic
@section Exact Arithmetic with Floatingpoint Numbers
@@ 18905,11 +18982,12 @@ do not hold completely, and order of operation may be
important
for your computation. Rounding error, cumulative precision loss
and underflow are often troublesome.
When @command{gawk} tests the expressions 0.1 + 12.2 and 12.3 for equality
using the machine double precision arithmetic it decides that they
are not equal
(@pxref{Floatingpoint Programming})!
You can get the result you want by increasing the precision,
+When @command{gawk} tests the expressions @samp{0.1 + 12.2} and @samp{12.3}
+for equality
+using the machine double precision arithmetic, it decides that they
+are not equal!
+(@xref{Floatingpoint Programming}.)
+You can get the result you want by increasing the precision;
56 in this case will get the job done:
@example
@@ 18917,7 +18995,9 @@ $ @kbd{gawk M vPREC=56 'BEGIN @{ print (0.1 + 12.2 ==
12.3) @}'}
@print{} 1
@end example
Using an even larger value of @code{PREC}:
+If adding more bits is good, perhaps adding even more bits of
+precicision is better?
+Here is what happens if we use an even larger value of @code{PREC}:
@example
$ @kbd{gawk M vPREC=201 'BEGIN @{ print (0.1 + 12.2 == 12.3) @}'}
@@ 18927,22 +19007,22 @@ $ @kbd{gawk M vPREC=201 'BEGIN @{ print (0.1 + 12.2
== 12.3) @}'}
This is not a bug in @command{gawk} or in the MPFR library.
It is easy to forget that the finite number of bits used to store the value
is often just an approximation after proper rounding.
The test for equality succeeds if and only if all bits in the two operands
+The test for equality succeeds if and only if @emph{all} bits in the two
operands
are exactly the same. Since this is not necessarily true after floatingpoint
computations with a particular precision and the effective rounding rule,
+computations with a particular precision and effective rounding rule,
a straight test for equality may not work.
So don't assume that floatingpoint values can be compared for equality.
+So, don't assume that floatingpoint values can be compared for equality.
You should also exercise caution when using other forms of comparisons.
The standard way to compare between floatingpoint numbers is to determine
how much error (or tolerance) you will allow in a comparison and
+how much error (or @dfn{tolerance}) you will allow in a comparison and
check to see if one value is within this error range of the other.
In applications where 15 or fewer decimal places suffice,
hardware double precision arithmetic can be adequate, and is usually much
faster.
But you do need to keep in mind that every floatingpoint operation
can suffer a new rounding error with catastrophic consequences as illustrated
by our attempt to compute the value of the constant @samp{pi},
+by our attempt to compute the value of the constant @value{PI},
(@pxref{Floatingpoint Programming}).
Extra precision can greatly enhance the stability and the accuracy
of your computation in such cases.
@@ 18963,19 +19043,46 @@ precision with 64bit IEEE binary floatingpoint
representation
for numbers on most systems. A large integer like 9007199254740997
has a binary representation that, although finite, is more than 53 bits long;
it must also be rounded to 53 bits.
The biggest integer that can be stored in a double is usually the same
as the largest possible value of a double. If your system double is
an IEEE 64bit double, it is an integer and can be represented precisely.
What more should one know about integers?
+The biggest integer that can be stored in a C @code{double} is usually the same
+as the largest possible value of a @code{double}. If your system @code{double}
+is an IEEE 64bit @code{double}, this largest possible value is an integer and
+can be represented precisely. What more should one know about integers?
If you want to know what is the largest integer, such that it and
all smaller integers can be stored in 64bit doubles without losing precision,
then the answer is 2^53. The next representable number is the even number
2^53 + 2 meaning it is unlikely that you will be able to make
address@hidden to print 2^53 + 1 in integer format.
+then the answer is
address@hidden
address@hidden
address@hidden iftex
address@hidden
+2^53.
address@hidden ifnottex
+The next representable number is the even number
address@hidden
address@hidden + 2},
address@hidden iftex
address@hidden
+2^53 + 2,
address@hidden ifnottex
+meaning it is unlikely that you will be able to make
address@hidden print
address@hidden
address@hidden + 1}
address@hidden iftex
address@hidden
+2^53 + 1
address@hidden ifnottex
+in integer format.
The range of integers exactly representable by a 64bit double
is [2^53, 2^53]. If you ever see an integer outside this range in
@command{gawk}
using 64bit doubles, you have the reason to be very suspicious about
+is
address@hidden
address@hidden, 2^{53}]}.
address@hidden iftex
address@hidden
address@hidden, 2^53].
address@hidden ifnottex
+If you ever see an integer outside this range in @command{gawk}
+using 64bit doubles, you have reason to be very suspicious about
the accuracy of the output. Here is a simple program with erroneous output:
@example
@@ 18986,21 +19093,29 @@ $ @kbd{gawk 'BEGIN @{ i = 2^53  1; for (j = 0; j <
4; j++) print i + j @}'}
@print{} 9007199254740994
@end example
The lesson is not to assume a large integer printed by @command{gawk}
to be an exact result from your computation, especially if it wraps around on
your terminal screen.
+The lesson is to not assume that any large integer printed by @command{gawk}
+represents an exact result from your computation, especially if it wraps
+around on your screen.
@node Arbitrary Precision Integers
@section Arbitrary Precision Integer Arithmetic with @command{gawk}
@cindex integer, arbitrary precision
If the option @option{arbitraryprecision} or @option{M} is specified,
@command{gawk} will perform all
+If the option @option{arbitraryprecision} or @option{M} is specified,
address@hidden performs all
integer arithmetic using GMP arbitrary precision integers.
Any number that looks like an integer in a program source or data file
will be stored as an arbitrary precision integer.
+is stored as an arbitrary precision integer.
The size of the integer is limited only by your computer's memory.
The current floatingpoint context has no effect on operations involving
integers.
For example, the following computes 5^4^3^2, the result of which is beyond the
+For example, the following computes
address@hidden
address@hidden,
address@hidden iftex
address@hidden
+5^4^3^2,
address@hidden ifnottex
+the result of which is beyond the
limits of ordinary @command{gawk} numbers:
@example
@@ 19013,14 +19128,23 @@ $ @kbd{gawk M 'BEGIN @{}
@print{} 62060698786608744707 ... 92256259918212890625
@end example
If you were to compute the same using arbitrary precision floats instead,
the precision needed for correct output,
using the formula @code{prec = 3.322 * dps},
would be 3.322 * 183231 or 608693.
+If you were to compute the same value using arbitrary precision
+floatingpoint values instead, the precision needed for correct output
+(using the formula
address@hidden
address@hidden = 3.322 @cdot dps}),
+would be @math{3.322 @cdot 183231},
address@hidden iftex
address@hidden
address@hidden = 3.322 * dps}),
+would be 3.322 x 183231,
address@hidden ifnottex
+or 608693.
The result from an arithmetic operation with an integer and a float
is a float with a precision equal to the working precision.
+The result from an arithmetic operation with an integer and a floatingpoint
value
+is a floatingpoint value with a precision equal to the working precision.
The following program calculates the eighth term in
address@hidden FIXME: JOHN: Cite a URL for what Sylvester's sequence is...
Sylvester's sequence using a recurrence:
@example
@@ 19028,19 +19152,20 @@ $ @kbd{gawk M 'BEGIN @{}
> @kbd{s = 2.0}
> @kbd{for (i = 1; i <= 7; i++)}
> @kbd{s = s * (s  1) + 1}
> @kbd{print address@hidden'}
+> @kbd{print s}
+> @address@hidden'}
@print{} 113423713055421845118910464
@end example
The output differs from the acutal number 113423713055421844361000443
because the default precision 53 is not enough to represent the
floatingpoint results exactly. You can either increase
the precision (100 in this case is enough), or replace the float 2.0 with
an integer to perform all computations using integer arithmetic to
get the correct output.
+The output differs from the acutal number, 113423713055421844361000443,
+because the default precision of 53 is not enough to represent the
+floatingpoint results exactly. You can either increase the precision
+(100 is enough in this case), or replace the floatingpoint constant
address@hidden with an integer, to perform all computations using integer
+arithmetic to get the correct output.
It will sometimes be necessary for @command{gawk} to implicitly convert an
arbitrary precision integer into an arbitrary precision float.
+arbitrary precision integer into an arbitrary precision floatingpoint value.
This is primarily because the MPFR library does not always provide the
relevant interface to process arbitrary precision integers or mixedmode
numbers as needed by an operation or function.
@@ 19050,31 +19175,30 @@ If this is not what you need or want, you can employ
a subterfuge
like this:
@example
$ @kbd{gawk M 'BEGIN @{ n = 13; print (n + 0.0) % 2.0 @}'}
+gawk M 'BEGIN @{ n = 13; print (n + 0.0) % 2.0 @}'
@end example
You can avoid this issue altogether by specifying the number as a float
to begin with:
@example
$ @kbd{gawk M 'BEGIN @{ n = 13.0; print n % 2.0 @}'}
+gawk M 'BEGIN @{ n = 13.0; print n % 2.0 @}'
@end example
Note that for the particular example above, there is unlikely to be a
reason for simply not using the following:
@example
$ @kbd{gawk M 'BEGIN @{ n = 13; print n % 2 @}'}
+gawk M 'BEGIN @{ n = 13; print n % 2 @}'
@end example
@node MPFR and GMP Libraries
@section Information About the MPFR and GMP Libraries
There are few elements available in the @code{PROCINFO} array
+There are a few elements available in the @code{PROCINFO} array
to provide information about the MPFR and GMP libraries.
(@xref{Autoset}.)

address@hidden, for more information.
@node Advanced Features
@chapter Advanced Features of @command{gawk}

Summary of changes:
awkgram.c  330 ++++++
command.c  148 +++
doc/ChangeLog  4 +
doc/gawk.info  1685 +++++++++++++++++++++++++++++
doc/gawk.texi  516 +++++++++++
5 files changed, 1423 insertions(+), 1260 deletions()
hooks/postreceive

gawk
[Prev in Thread] 
Current Thread 
[Next in Thread] 
 [gawkdiffs] [SCM] gawk branch, gawk_mpfr, updated. 2aa4ca2371c89581a5cb0cbec0882f5ef1efa1f3,
Arnold Robbins <=