aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog7
-rw-r--r--doc/awkcard.in6
-rw-r--r--doc/gawk.12
-rw-r--r--doc/gawk.info771
-rw-r--r--doc/gawk.texi32
-rw-r--r--doc/gawktexi.in32
6 files changed, 403 insertions, 447 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ad5aca41..567fa990 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -8,6 +8,13 @@
2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
+ * awkcard.in: Comment out description of intdiv().
+ * gawk.1: Ditto.
+ * gawktexi.in: References to intdiv changed to intdiv0 and
+ bracketed inside @ifset INTDIV. Not set by default.
+
+2017-04-16 Arnold D. Robbins <arnold@skeeve.com>
+
* gawktexi.in: Improve documentation of the intdiv() function.
2017-04-12 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/doc/awkcard.in b/doc/awkcard.in
index 86aeee2e..165fca43 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -1617,9 +1617,9 @@ l lw(1.9i).
\*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians.
\*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR).
\*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer.
-\*(CB\*(FCintdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI r\*(FR\*(FC)\*(FR T{
-Return result of integer division in \*(FIr\*(FR.\*(CD
-T}
+.\" \*(CB\*(FCintdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI r\*(FR\*(FC)\*(FR T{
+.\" Return result of integer division in \*(FIr\*(FR.\*(CD
+.\" T}
\*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR).
\*(FCrand()\fP A random number \*(FIN\fP such that 0 \(<= \*(FIN\fP < 1.
\*(FCsin(\*(FIexpr\*(FC)\*(FR The sine of \*(FIexpr\fP, which is in radians.
diff --git a/doc/gawk.1 b/doc/gawk.1
index b04cb013..1b42cc90 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -2711,6 +2711,7 @@ The exponential function.
.TP
.BI int( expr )
Truncate to integer.
+.ig
.TP
.BI intdiv( num ", " denom ", " result )
Truncate
@@ -2728,6 +2729,7 @@ This is a
.I gawk
extension, primarily of value when working with
arbitrarily large integers.
+..
.TP
.BI log( expr )
The natural logarithm function.
diff --git a/doc/gawk.info b/doc/gawk.info
index 5111770d..3779fa95 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -12281,24 +12281,6 @@ brackets ([ ]):
truncated toward zero. For example, 'int(3)' is 3, 'int(3.9)' is
3, 'int(-3.9)' is -3, and 'int(-3)' is -3 as well.
-'intdiv(NUMERATOR, DENOMINATOR, RESULT)'
- Perform integer division, similar to the standard C 'div()'
- function. First, truncate 'numerator' and 'denominator' towards
- zero, creating integer values. Clear the 'result' array, and then
- set 'result["quotient"]' to the result of 'numerator /
- denominator', truncated towards zero to an integer, and set
- 'result["remainder"]' to the result of 'numerator % denominator',
- truncated towards zero to an integer. Attempting division by zero
- causes a fatal error. The function returns zero upon success, and
- -1 upon error.
-
- This function is primarily intended for use with arbitrary length
- integers; it avoids creating MPFR arbitrary precision
- floating-point values (*note Arbitrary Precision Integers::).
-
- This function is a 'gawk' extension. It is not available in
- compatibility mode (*note Options::).
-
'log(X)'
Return the natural logarithm of X, if X is positive; otherwise,
return 'NaN' ("not a number") on IEEE 754 systems. Additionally,
@@ -23095,59 +23077,7 @@ the following:
When dividing two arbitrary precision integers with either '/' or
'%', the result is typically an arbitrary precision floating point value
-(unless the denominator evenly divides into the numerator). In order to
-do integer division or remainder with arbitrary precision integers, use
-the built-in 'intdiv()' function (*note Numeric Functions::).
-
- You can simulate the 'intdiv()' function in standard 'awk' using this
-user-defined function:
-
- # intdiv --- do integer division
-
- function intdiv(numerator, denominator, result)
- {
- split("", result)
-
- numerator = int(numerator)
- denominator = int(denominator)
- result["quotient"] = int(numerator / denominator)
- result["remainder"] = int(numerator % denominator)
-
- return 0.0
- }
-
- The following example program, contributed by Katie Wasserman, uses
-'intdiv()' to compute the digits of pi to as many places as you choose
-to set:
-
- # pi.awk --- compute the digits of pi
-
- BEGIN {
- digits = 100000
- two = 2 * 10 ^ digits
- pi = two
- for (m = digits * 4; m > 0; --m) {
- d = m * 2 + 1
- x = pi * m
- intdiv(x, d, result)
- pi = result["quotient"]
- pi = pi + two
- }
- print pi
- }
-
- When asked about the algorithm used, Katie replied:
-
- It's not that well known but it's not that obscure either. It's
- Euler's modification to Newton's method for calculating pi. Take a
- look at lines (23) - (25) here:
- <http://mathworld.wolfram.com/PiFormulas.html>.
-
- The algorithm I wrote simply expands the multiply by 2 and works
- from the innermost expression outwards. I used this to program HP
- calculators because it's quite easy to modify for tiny memory
- devices with smallish word sizes. See
- <http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899>.
+(unless the denominator evenly divides into the numerator).
---------- Footnotes ----------
@@ -27422,9 +27352,6 @@ current version of 'gawk'.
- The 'bindtextdomain()', 'dcgettext()', and 'dcngettext()'
functions for internationalization (*note Programmer i18n::)
- - The 'intdiv()' function for doing integer division and
- remainder (*note Numeric Functions::)
-
* Changes and/or additions in the command-line options:
- The 'AWKPATH' environment variable for specifying a path
@@ -27887,8 +27814,6 @@ POSIX 'awk', in the order they were added to 'gawk'.
* The 'igawk' program and its manual page are no longer installed
when 'gawk' is built. *Note Igawk Program::.
- * The 'intdiv()' function. *Note Numeric Functions::.
-
* The maximum number of hexadecimal digits in '\x' escapes is now
two. *Note Escape Sequences::.
@@ -34297,8 +34222,6 @@ Index
* instruction tracing, in debugger: Debugger Info. (line 90)
* int: Numeric Functions. (line 24)
* INT signal (MS-Windows): Profiling. (line 212)
-* intdiv: Numeric Functions. (line 29)
-* intdiv <1>: Numeric Functions. (line 29)
* integer array indices: Numeric Array Subscripts.
(line 31)
* integers, arbitrary precision: Arbitrary Precision Integers.
@@ -34448,9 +34371,9 @@ Index
* localization: I18N and L10N. (line 6)
* localization, See internationalization, localization: I18N and L10N.
(line 6)
-* log: Numeric Functions. (line 47)
+* log: Numeric Functions. (line 29)
* log files, timestamps in: Time Functions. (line 6)
-* logarithm: Numeric Functions. (line 47)
+* logarithm: Numeric Functions. (line 29)
* logical false/true: Truth Values. (line 6)
* logical operators, See Boolean expressions: Boolean Ops. (line 6)
* login information: Passwd Functions. (line 16)
@@ -34913,12 +34836,12 @@ Index
* Rakitzis, Byron: History Sorting. (line 25)
* Ramey, Chet: Acknowledgments. (line 60)
* Ramey, Chet <1>: General Data Types. (line 6)
-* rand: Numeric Functions. (line 52)
+* rand: Numeric Functions. (line 34)
* random numbers, Cliff: Cliff Random Function.
(line 6)
* random numbers, rand()/srand() functions: Numeric Functions.
- (line 52)
-* random numbers, seed of: Numeric Functions. (line 82)
+ (line 34)
+* random numbers, seed of: Numeric Functions. (line 64)
* range expressions (regexps): Bracket Expressions. (line 6)
* range patterns: Ranges. (line 6)
* range patterns, line continuation and: Ranges. (line 64)
@@ -35096,7 +35019,7 @@ Index
* sed utility: Full Line Fields. (line 22)
* sed utility <1>: Simple Sed. (line 6)
* sed utility <2>: Glossary. (line 16)
-* seeding random number generator: Numeric Functions. (line 82)
+* seeding random number generator: Numeric Functions. (line 64)
* semicolon (;), AWKPATH variable and: PC Using. (line 9)
* semicolon (;), separating statements in actions: Statements/Lines.
(line 90)
@@ -35200,8 +35123,8 @@ Index
* SIGUSR1 signal, for dynamic profiling: Profiling. (line 186)
* silent debugger command: Debugger Execution Control.
(line 10)
-* sin: Numeric Functions. (line 93)
-* sine: Numeric Functions. (line 93)
+* sin: Numeric Functions. (line 75)
+* sine: Numeric Functions. (line 75)
* single quote ('): One-shot. (line 15)
* single quote (') in gawk command lines: Long. (line 35)
* single quote ('), in shell commands: Quoting. (line 48)
@@ -35251,10 +35174,10 @@ Index
* sprintf() function, OFMT variable and: User-modified. (line 116)
* sprintf() function, print/printf statements and: Round Function.
(line 6)
-* sqrt: Numeric Functions. (line 96)
+* sqrt: Numeric Functions. (line 78)
* square brackets ([]), regexp operator: Regexp Operators. (line 56)
-* square root: Numeric Functions. (line 96)
-* srand: Numeric Functions. (line 100)
+* square root: Numeric Functions. (line 78)
+* srand: Numeric Functions. (line 82)
* stack frame: Debugging Terms. (line 10)
* Stallman, Richard: Manual History. (line 6)
* Stallman, Richard <1>: Acknowledgments. (line 18)
@@ -35814,340 +35737,340 @@ Node: Functions517052
Node: Built-in518090
Node: Calling Built-in519171
Node: Numeric Functions521167
-Ref: Numeric Functions-Footnote-1526112
-Ref: Numeric Functions-Footnote-2526469
-Ref: Numeric Functions-Footnote-3526517
-Node: String Functions526789
-Ref: String Functions-Footnote-1550447
-Ref: String Functions-Footnote-2550575
-Ref: String Functions-Footnote-3550823
-Node: Gory Details550910
-Ref: table-sub-escapes552701
-Ref: table-sub-proposed554220
-Ref: table-posix-sub555583
-Ref: table-gensub-escapes557124
-Ref: Gory Details-Footnote-1557947
-Node: I/O Functions558101
-Ref: table-system-return-values564683
-Ref: I/O Functions-Footnote-1566663
-Ref: I/O Functions-Footnote-2566811
-Node: Time Functions566931
-Ref: Time Functions-Footnote-1577598
-Ref: Time Functions-Footnote-2577666
-Ref: Time Functions-Footnote-3577824
-Ref: Time Functions-Footnote-4577935
-Ref: Time Functions-Footnote-5578047
-Ref: Time Functions-Footnote-6578274
-Node: Bitwise Functions578540
-Ref: table-bitwise-ops579134
-Ref: Bitwise Functions-Footnote-1585167
-Ref: Bitwise Functions-Footnote-2585340
-Node: Type Functions585531
-Node: I18N Functions588206
-Node: User-defined589857
-Node: Definition Syntax590662
-Ref: Definition Syntax-Footnote-1596349
-Node: Function Example596420
-Ref: Function Example-Footnote-1599342
-Node: Function Caveats599364
-Node: Calling A Function599882
-Node: Variable Scope600840
-Node: Pass By Value/Reference603834
-Node: Return Statement607333
-Node: Dynamic Typing610312
-Node: Indirect Calls611242
-Ref: Indirect Calls-Footnote-1621493
-Node: Functions Summary621621
-Node: Library Functions624326
-Ref: Library Functions-Footnote-1627933
-Ref: Library Functions-Footnote-2628076
-Node: Library Names628247
-Ref: Library Names-Footnote-1631707
-Ref: Library Names-Footnote-2631930
-Node: General Functions632016
-Node: Strtonum Function633119
-Node: Assert Function636141
-Node: Round Function639467
-Node: Cliff Random Function641008
-Node: Ordinal Functions642024
-Ref: Ordinal Functions-Footnote-1645087
-Ref: Ordinal Functions-Footnote-2645339
-Node: Join Function645549
-Ref: Join Function-Footnote-1647319
-Node: Getlocaltime Function647519
-Node: Readfile Function651261
-Node: Shell Quoting653233
-Node: Data File Management654634
-Node: Filetrans Function655266
-Node: Rewind Function659362
-Node: File Checking661268
-Ref: File Checking-Footnote-1662602
-Node: Empty Files662803
-Node: Ignoring Assigns664782
-Node: Getopt Function666332
-Ref: Getopt Function-Footnote-1677801
-Node: Passwd Functions678001
-Ref: Passwd Functions-Footnote-1686840
-Node: Group Functions686928
-Ref: Group Functions-Footnote-1694826
-Node: Walking Arrays695033
-Node: Library Functions Summary698041
-Node: Library Exercises699447
-Node: Sample Programs699912
-Node: Running Examples700682
-Node: Clones701410
-Node: Cut Program702634
-Node: Egrep Program712563
-Ref: Egrep Program-Footnote-1720075
-Node: Id Program720185
-Node: Split Program723865
-Ref: Split Program-Footnote-1727324
-Node: Tee Program727453
-Node: Uniq Program730243
-Node: Wc Program737669
-Ref: Wc Program-Footnote-1741924
-Node: Miscellaneous Programs742018
-Node: Dupword Program743231
-Node: Alarm Program745261
-Node: Translate Program750116
-Ref: Translate Program-Footnote-1754681
-Node: Labels Program754951
-Ref: Labels Program-Footnote-1758302
-Node: Word Sorting758386
-Node: History Sorting762458
-Node: Extract Program764293
-Node: Simple Sed771822
-Node: Igawk Program774896
-Ref: Igawk Program-Footnote-1789227
-Ref: Igawk Program-Footnote-2789429
-Ref: Igawk Program-Footnote-3789551
-Node: Anagram Program789666
-Node: Signature Program792728
-Node: Programs Summary793975
-Node: Programs Exercises795189
-Ref: Programs Exercises-Footnote-1799318
-Node: Advanced Features799409
-Node: Nondecimal Data801399
-Node: Array Sorting802990
-Node: Controlling Array Traversal803690
-Ref: Controlling Array Traversal-Footnote-1812057
-Node: Array Sorting Functions812175
-Ref: Array Sorting Functions-Footnote-1817266
-Node: Two-way I/O817462
-Ref: Two-way I/O-Footnote-1824013
-Ref: Two-way I/O-Footnote-2824200
-Node: TCP/IP Networking824282
-Node: Profiling827400
-Ref: Profiling-Footnote-1836072
-Node: Advanced Features Summary836395
-Node: Internationalization838239
-Node: I18N and L10N839719
-Node: Explaining gettext840406
-Ref: Explaining gettext-Footnote-1846298
-Ref: Explaining gettext-Footnote-2846483
-Node: Programmer i18n846648
-Ref: Programmer i18n-Footnote-1851597
-Node: Translator i18n851646
-Node: String Extraction852440
-Ref: String Extraction-Footnote-1853572
-Node: Printf Ordering853658
-Ref: Printf Ordering-Footnote-1856444
-Node: I18N Portability856508
-Ref: I18N Portability-Footnote-1858964
-Node: I18N Example859027
-Ref: I18N Example-Footnote-1861833
-Node: Gawk I18N861906
-Node: I18N Summary862551
-Node: Debugger863892
-Node: Debugging864914
-Node: Debugging Concepts865355
-Node: Debugging Terms867164
-Node: Awk Debugging869739
-Node: Sample Debugging Session870645
-Node: Debugger Invocation871179
-Node: Finding The Bug872565
-Node: List of Debugger Commands879043
-Node: Breakpoint Control880376
-Node: Debugger Execution Control884070
-Node: Viewing And Changing Data887432
-Node: Execution Stack890806
-Node: Debugger Info892443
-Node: Miscellaneous Debugger Commands896514
-Node: Readline Support901602
-Node: Limitations902498
-Node: Debugging Summary904607
-Node: Arbitrary Precision Arithmetic905886
-Node: Computer Arithmetic907302
-Ref: table-numeric-ranges910893
-Ref: Computer Arithmetic-Footnote-1911615
-Node: Math Definitions911672
-Ref: table-ieee-formats914986
-Ref: Math Definitions-Footnote-1915589
-Node: MPFR features915694
-Node: FP Math Caution917411
-Ref: FP Math Caution-Footnote-1918483
-Node: Inexactness of computations918852
-Node: Inexact representation919812
-Node: Comparing FP Values921172
-Node: Errors accumulate922254
-Node: Getting Accuracy923687
-Node: Try To Round926397
-Node: Setting precision927296
-Ref: table-predefined-precision-strings927993
-Node: Setting the rounding mode929823
-Ref: table-gawk-rounding-modes930197
-Ref: Setting the rounding mode-Footnote-1933605
-Node: Arbitrary Precision Integers933784
-Ref: Arbitrary Precision Integers-Footnote-1938701
-Node: POSIX Floating Point Problems938850
-Ref: POSIX Floating Point Problems-Footnote-1942732
-Node: Floating point summary942770
-Node: Dynamic Extensions944960
-Node: Extension Intro946513
-Node: Plugin License947779
-Node: Extension Mechanism Outline948576
-Ref: figure-load-extension949015
-Ref: figure-register-new-function950580
-Ref: figure-call-new-function951672
-Node: Extension API Description953734
-Node: Extension API Functions Introduction955376
-Node: General Data Types960710
-Ref: General Data Types-Footnote-1967915
-Node: Memory Allocation Functions968214
-Ref: Memory Allocation Functions-Footnote-1971059
-Node: Constructor Functions971158
-Node: Registration Functions974157
-Node: Extension Functions974842
-Node: Exit Callback Functions980055
-Node: Extension Version String981305
-Node: Input Parsers981968
-Node: Output Wrappers994675
-Node: Two-way processors999187
-Node: Printing Messages1001452
-Ref: Printing Messages-Footnote-11002623
-Node: Updating ERRNO1002776
-Node: Requesting Values1003515
-Ref: table-value-types-returned1004252
-Node: Accessing Parameters1005188
-Node: Symbol Table Access1006423
-Node: Symbol table by name1006935
-Node: Symbol table by cookie1008724
-Ref: Symbol table by cookie-Footnote-11012909
-Node: Cached values1012973
-Ref: Cached values-Footnote-11016509
-Node: Array Manipulation1016600
-Ref: Array Manipulation-Footnote-11017691
-Node: Array Data Types1017728
-Ref: Array Data Types-Footnote-11020386
-Node: Array Functions1020478
-Node: Flattening Arrays1024877
-Node: Creating Arrays1031818
-Node: Redirection API1036587
-Node: Extension API Variables1039429
-Node: Extension Versioning1040062
-Ref: gawk-api-version1040499
-Node: Extension API Informational Variables1042227
-Node: Extension API Boilerplate1043291
-Node: Changes from API V11047153
-Node: Finding Extensions1047813
-Node: Extension Example1048372
-Node: Internal File Description1049170
-Node: Internal File Ops1053250
-Ref: Internal File Ops-Footnote-11064650
-Node: Using Internal File Ops1064790
-Ref: Using Internal File Ops-Footnote-11067173
-Node: Extension Samples1067447
-Node: Extension Sample File Functions1068976
-Node: Extension Sample Fnmatch1076625
-Node: Extension Sample Fork1078112
-Node: Extension Sample Inplace1079330
-Node: Extension Sample Ord1082540
-Node: Extension Sample Readdir1083376
-Ref: table-readdir-file-types1084265
-Node: Extension Sample Revout1085070
-Node: Extension Sample Rev2way1085659
-Node: Extension Sample Read write array1086399
-Node: Extension Sample Readfile1088341
-Node: Extension Sample Time1089436
-Node: Extension Sample API Tests1090784
-Node: gawkextlib1091276
-Node: Extension summary1093723
-Node: Extension Exercises1097425
-Node: Language History1098923
-Node: V7/SVR3.11100579
-Node: SVR41102731
-Node: POSIX1104165
-Node: BTL1105544
-Node: POSIX/GNU1106273
-Node: Feature History1112165
-Node: Common Extensions1126535
-Node: Ranges and Locales1127818
-Ref: Ranges and Locales-Footnote-11132434
-Ref: Ranges and Locales-Footnote-21132461
-Ref: Ranges and Locales-Footnote-31132696
-Node: Contributors1132917
-Node: History summary1138477
-Node: Installation1139857
-Node: Gawk Distribution1140801
-Node: Getting1141285
-Node: Extracting1142246
-Node: Distribution contents1143884
-Node: Unix Installation1150226
-Node: Quick Installation1150908
-Node: Shell Startup Files1153322
-Node: Additional Configuration Options1154411
-Node: Configuration Philosophy1156400
-Node: Non-Unix Installation1158769
-Node: PC Installation1159229
-Node: PC Binary Installation1160067
-Node: PC Compiling1160502
-Node: PC Using1161619
-Node: Cygwin1164664
-Node: MSYS1165434
-Node: VMS Installation1165935
-Node: VMS Compilation1166726
-Ref: VMS Compilation-Footnote-11167955
-Node: VMS Dynamic Extensions1168013
-Node: VMS Installation Details1169698
-Node: VMS Running1171951
-Node: VMS GNV1176230
-Node: VMS Old Gawk1176965
-Node: Bugs1177436
-Node: Bug address1178099
-Node: Usenet1180496
-Node: Maintainers1181273
-Node: Other Versions1182649
-Node: Installation summary1189233
-Node: Notes1190268
-Node: Compatibility Mode1191133
-Node: Additions1191915
-Node: Accessing The Source1192840
-Node: Adding Code1194275
-Node: New Ports1200493
-Node: Derived Files1204981
-Ref: Derived Files-Footnote-11210466
-Ref: Derived Files-Footnote-21210501
-Ref: Derived Files-Footnote-31211099
-Node: Future Extensions1211213
-Node: Implementation Limitations1211871
-Node: Extension Design1213054
-Node: Old Extension Problems1214208
-Ref: Old Extension Problems-Footnote-11215726
-Node: Extension New Mechanism Goals1215783
-Ref: Extension New Mechanism Goals-Footnote-11219147
-Node: Extension Other Design Decisions1219336
-Node: Extension Future Growth1221449
-Node: Old Extension Mechanism1222285
-Node: Notes summary1224048
-Node: Basic Concepts1225230
-Node: Basic High Level1225911
-Ref: figure-general-flow1226193
-Ref: figure-process-flow1226878
-Ref: Basic High Level-Footnote-11230179
-Node: Basic Data Typing1230364
-Node: Glossary1233692
-Node: Copying1265639
-Node: GNU Free Documentation License1303178
-Node: Index1328296
+Ref: Numeric Functions-Footnote-1525195
+Ref: Numeric Functions-Footnote-2525552
+Ref: Numeric Functions-Footnote-3525600
+Node: String Functions525872
+Ref: String Functions-Footnote-1549530
+Ref: String Functions-Footnote-2549658
+Ref: String Functions-Footnote-3549906
+Node: Gory Details549993
+Ref: table-sub-escapes551784
+Ref: table-sub-proposed553303
+Ref: table-posix-sub554666
+Ref: table-gensub-escapes556207
+Ref: Gory Details-Footnote-1557030
+Node: I/O Functions557184
+Ref: table-system-return-values563766
+Ref: I/O Functions-Footnote-1565746
+Ref: I/O Functions-Footnote-2565894
+Node: Time Functions566014
+Ref: Time Functions-Footnote-1576681
+Ref: Time Functions-Footnote-2576749
+Ref: Time Functions-Footnote-3576907
+Ref: Time Functions-Footnote-4577018
+Ref: Time Functions-Footnote-5577130
+Ref: Time Functions-Footnote-6577357
+Node: Bitwise Functions577623
+Ref: table-bitwise-ops578217
+Ref: Bitwise Functions-Footnote-1584250
+Ref: Bitwise Functions-Footnote-2584423
+Node: Type Functions584614
+Node: I18N Functions587289
+Node: User-defined588940
+Node: Definition Syntax589745
+Ref: Definition Syntax-Footnote-1595432
+Node: Function Example595503
+Ref: Function Example-Footnote-1598425
+Node: Function Caveats598447
+Node: Calling A Function598965
+Node: Variable Scope599923
+Node: Pass By Value/Reference602917
+Node: Return Statement606416
+Node: Dynamic Typing609395
+Node: Indirect Calls610325
+Ref: Indirect Calls-Footnote-1620576
+Node: Functions Summary620704
+Node: Library Functions623409
+Ref: Library Functions-Footnote-1627016
+Ref: Library Functions-Footnote-2627159
+Node: Library Names627330
+Ref: Library Names-Footnote-1630790
+Ref: Library Names-Footnote-2631013
+Node: General Functions631099
+Node: Strtonum Function632202
+Node: Assert Function635224
+Node: Round Function638550
+Node: Cliff Random Function640091
+Node: Ordinal Functions641107
+Ref: Ordinal Functions-Footnote-1644170
+Ref: Ordinal Functions-Footnote-2644422
+Node: Join Function644632
+Ref: Join Function-Footnote-1646402
+Node: Getlocaltime Function646602
+Node: Readfile Function650344
+Node: Shell Quoting652316
+Node: Data File Management653717
+Node: Filetrans Function654349
+Node: Rewind Function658445
+Node: File Checking660351
+Ref: File Checking-Footnote-1661685
+Node: Empty Files661886
+Node: Ignoring Assigns663865
+Node: Getopt Function665415
+Ref: Getopt Function-Footnote-1676884
+Node: Passwd Functions677084
+Ref: Passwd Functions-Footnote-1685923
+Node: Group Functions686011
+Ref: Group Functions-Footnote-1693909
+Node: Walking Arrays694116
+Node: Library Functions Summary697124
+Node: Library Exercises698530
+Node: Sample Programs698995
+Node: Running Examples699765
+Node: Clones700493
+Node: Cut Program701717
+Node: Egrep Program711646
+Ref: Egrep Program-Footnote-1719158
+Node: Id Program719268
+Node: Split Program722948
+Ref: Split Program-Footnote-1726407
+Node: Tee Program726536
+Node: Uniq Program729326
+Node: Wc Program736752
+Ref: Wc Program-Footnote-1741007
+Node: Miscellaneous Programs741101
+Node: Dupword Program742314
+Node: Alarm Program744344
+Node: Translate Program749199
+Ref: Translate Program-Footnote-1753764
+Node: Labels Program754034
+Ref: Labels Program-Footnote-1757385
+Node: Word Sorting757469
+Node: History Sorting761541
+Node: Extract Program763376
+Node: Simple Sed770905
+Node: Igawk Program773979
+Ref: Igawk Program-Footnote-1788310
+Ref: Igawk Program-Footnote-2788512
+Ref: Igawk Program-Footnote-3788634
+Node: Anagram Program788749
+Node: Signature Program791811
+Node: Programs Summary793058
+Node: Programs Exercises794272
+Ref: Programs Exercises-Footnote-1798401
+Node: Advanced Features798492
+Node: Nondecimal Data800482
+Node: Array Sorting802073
+Node: Controlling Array Traversal802773
+Ref: Controlling Array Traversal-Footnote-1811140
+Node: Array Sorting Functions811258
+Ref: Array Sorting Functions-Footnote-1816349
+Node: Two-way I/O816545
+Ref: Two-way I/O-Footnote-1823096
+Ref: Two-way I/O-Footnote-2823283
+Node: TCP/IP Networking823365
+Node: Profiling826483
+Ref: Profiling-Footnote-1835155
+Node: Advanced Features Summary835478
+Node: Internationalization837322
+Node: I18N and L10N838802
+Node: Explaining gettext839489
+Ref: Explaining gettext-Footnote-1845381
+Ref: Explaining gettext-Footnote-2845566
+Node: Programmer i18n845731
+Ref: Programmer i18n-Footnote-1850680
+Node: Translator i18n850729
+Node: String Extraction851523
+Ref: String Extraction-Footnote-1852655
+Node: Printf Ordering852741
+Ref: Printf Ordering-Footnote-1855527
+Node: I18N Portability855591
+Ref: I18N Portability-Footnote-1858047
+Node: I18N Example858110
+Ref: I18N Example-Footnote-1860916
+Node: Gawk I18N860989
+Node: I18N Summary861634
+Node: Debugger862975
+Node: Debugging863997
+Node: Debugging Concepts864438
+Node: Debugging Terms866247
+Node: Awk Debugging868822
+Node: Sample Debugging Session869728
+Node: Debugger Invocation870262
+Node: Finding The Bug871648
+Node: List of Debugger Commands878126
+Node: Breakpoint Control879459
+Node: Debugger Execution Control883153
+Node: Viewing And Changing Data886515
+Node: Execution Stack889889
+Node: Debugger Info891526
+Node: Miscellaneous Debugger Commands895597
+Node: Readline Support900685
+Node: Limitations901581
+Node: Debugging Summary903690
+Node: Arbitrary Precision Arithmetic904969
+Node: Computer Arithmetic906385
+Ref: table-numeric-ranges909976
+Ref: Computer Arithmetic-Footnote-1910698
+Node: Math Definitions910755
+Ref: table-ieee-formats914069
+Ref: Math Definitions-Footnote-1914672
+Node: MPFR features914777
+Node: FP Math Caution916494
+Ref: FP Math Caution-Footnote-1917566
+Node: Inexactness of computations917935
+Node: Inexact representation918895
+Node: Comparing FP Values920255
+Node: Errors accumulate921337
+Node: Getting Accuracy922770
+Node: Try To Round925480
+Node: Setting precision926379
+Ref: table-predefined-precision-strings927076
+Node: Setting the rounding mode928906
+Ref: table-gawk-rounding-modes929280
+Ref: Setting the rounding mode-Footnote-1932688
+Node: Arbitrary Precision Integers932867
+Ref: Arbitrary Precision Integers-Footnote-1936054
+Node: POSIX Floating Point Problems936203
+Ref: POSIX Floating Point Problems-Footnote-1940085
+Node: Floating point summary940123
+Node: Dynamic Extensions942313
+Node: Extension Intro943866
+Node: Plugin License945132
+Node: Extension Mechanism Outline945929
+Ref: figure-load-extension946368
+Ref: figure-register-new-function947933
+Ref: figure-call-new-function949025
+Node: Extension API Description951087
+Node: Extension API Functions Introduction952729
+Node: General Data Types958063
+Ref: General Data Types-Footnote-1965268
+Node: Memory Allocation Functions965567
+Ref: Memory Allocation Functions-Footnote-1968412
+Node: Constructor Functions968511
+Node: Registration Functions971510
+Node: Extension Functions972195
+Node: Exit Callback Functions977408
+Node: Extension Version String978658
+Node: Input Parsers979321
+Node: Output Wrappers992028
+Node: Two-way processors996540
+Node: Printing Messages998805
+Ref: Printing Messages-Footnote-1999976
+Node: Updating ERRNO1000129
+Node: Requesting Values1000868
+Ref: table-value-types-returned1001605
+Node: Accessing Parameters1002541
+Node: Symbol Table Access1003776
+Node: Symbol table by name1004288
+Node: Symbol table by cookie1006077
+Ref: Symbol table by cookie-Footnote-11010262
+Node: Cached values1010326
+Ref: Cached values-Footnote-11013862
+Node: Array Manipulation1013953
+Ref: Array Manipulation-Footnote-11015044
+Node: Array Data Types1015081
+Ref: Array Data Types-Footnote-11017739
+Node: Array Functions1017831
+Node: Flattening Arrays1022230
+Node: Creating Arrays1029171
+Node: Redirection API1033940
+Node: Extension API Variables1036782
+Node: Extension Versioning1037415
+Ref: gawk-api-version1037852
+Node: Extension API Informational Variables1039580
+Node: Extension API Boilerplate1040644
+Node: Changes from API V11044506
+Node: Finding Extensions1045166
+Node: Extension Example1045725
+Node: Internal File Description1046523
+Node: Internal File Ops1050603
+Ref: Internal File Ops-Footnote-11062003
+Node: Using Internal File Ops1062143
+Ref: Using Internal File Ops-Footnote-11064526
+Node: Extension Samples1064800
+Node: Extension Sample File Functions1066329
+Node: Extension Sample Fnmatch1073978
+Node: Extension Sample Fork1075465
+Node: Extension Sample Inplace1076683
+Node: Extension Sample Ord1079893
+Node: Extension Sample Readdir1080729
+Ref: table-readdir-file-types1081618
+Node: Extension Sample Revout1082423
+Node: Extension Sample Rev2way1083012
+Node: Extension Sample Read write array1083752
+Node: Extension Sample Readfile1085694
+Node: Extension Sample Time1086789
+Node: Extension Sample API Tests1088137
+Node: gawkextlib1088629
+Node: Extension summary1091076
+Node: Extension Exercises1094778
+Node: Language History1096276
+Node: V7/SVR3.11097932
+Node: SVR41100084
+Node: POSIX1101518
+Node: BTL1102897
+Node: POSIX/GNU1103626
+Node: Feature History1109404
+Node: Common Extensions1123715
+Node: Ranges and Locales1124998
+Ref: Ranges and Locales-Footnote-11129614
+Ref: Ranges and Locales-Footnote-21129641
+Ref: Ranges and Locales-Footnote-31129876
+Node: Contributors1130097
+Node: History summary1135657
+Node: Installation1137037
+Node: Gawk Distribution1137981
+Node: Getting1138465
+Node: Extracting1139426
+Node: Distribution contents1141064
+Node: Unix Installation1147406
+Node: Quick Installation1148088
+Node: Shell Startup Files1150502
+Node: Additional Configuration Options1151591
+Node: Configuration Philosophy1153580
+Node: Non-Unix Installation1155949
+Node: PC Installation1156409
+Node: PC Binary Installation1157247
+Node: PC Compiling1157682
+Node: PC Using1158799
+Node: Cygwin1161844
+Node: MSYS1162614
+Node: VMS Installation1163115
+Node: VMS Compilation1163906
+Ref: VMS Compilation-Footnote-11165135
+Node: VMS Dynamic Extensions1165193
+Node: VMS Installation Details1166878
+Node: VMS Running1169131
+Node: VMS GNV1173410
+Node: VMS Old Gawk1174145
+Node: Bugs1174616
+Node: Bug address1175279
+Node: Usenet1177676
+Node: Maintainers1178453
+Node: Other Versions1179829
+Node: Installation summary1186413
+Node: Notes1187448
+Node: Compatibility Mode1188313
+Node: Additions1189095
+Node: Accessing The Source1190020
+Node: Adding Code1191455
+Node: New Ports1197673
+Node: Derived Files1202161
+Ref: Derived Files-Footnote-11207646
+Ref: Derived Files-Footnote-21207681
+Ref: Derived Files-Footnote-31208279
+Node: Future Extensions1208393
+Node: Implementation Limitations1209051
+Node: Extension Design1210234
+Node: Old Extension Problems1211388
+Ref: Old Extension Problems-Footnote-11212906
+Node: Extension New Mechanism Goals1212963
+Ref: Extension New Mechanism Goals-Footnote-11216327
+Node: Extension Other Design Decisions1216516
+Node: Extension Future Growth1218629
+Node: Old Extension Mechanism1219465
+Node: Notes summary1221228
+Node: Basic Concepts1222410
+Node: Basic High Level1223091
+Ref: figure-general-flow1223373
+Ref: figure-process-flow1224058
+Ref: Basic High Level-Footnote-11227359
+Node: Basic Data Typing1227544
+Node: Glossary1230872
+Node: Copying1262819
+Node: GNU Free Documentation License1300358
+Node: Index1325476

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 353a0c9d..06add9d1 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -17476,9 +17476,10 @@ truncated toward zero.
For example, @code{int(3)} is 3, @code{int(3.9)} is 3, @code{int(-3.9)}
is @minus{}3, and @code{int(-3)} is @minus{}3 as well.
-@item @code{intdiv(@var{numerator}, @var{denominator}, @var{result})}
-@cindexawkfunc{intdiv}
-@cindex intdiv
+@ifset INTDIV
+@item @code{intdiv0(@var{numerator}, @var{denominator}, @var{result})}
+@cindexawkfunc{intdiv0}
+@cindex intdiv0
Perform integer division, similar to the standard C @code{div()} function.
First, truncate @code{numerator} and @code{denominator}
towards zero, creating integer values. Clear the @code{result}
@@ -17496,6 +17497,7 @@ Precision Integers}).
This function is a @code{gawk} extension. It is not available in
compatibility mode (@pxref{Options}).
+@end ifset
@item @code{log(@var{x})}
@cindexawkfunc{log}
@@ -31925,16 +31927,18 @@ gawk -M 'BEGIN @{ n = 13; print n % 2 @}'
When dividing two arbitrary precision integers with either
@samp{/} or @samp{%}, the result is typically an arbitrary
precision floating point value (unless the denominator evenly
-divides into the numerator). In order to do integer division
+divides into the numerator).
+@ifset INTDIV
+In order to do integer division
or remainder with arbitrary precision integers, use the built-in
-@code{intdiv()} function (@pxref{Numeric Functions}).
+@code{intdiv0()} function (@pxref{Numeric Functions}).
-You can simulate the @code{intdiv()} function in standard @command{awk}
+You can simulate the @code{intdiv0()} function in standard @command{awk}
using this user-defined function:
@example
@c file eg/lib/intdiv.awk
-# intdiv --- do integer division
+# intdiv0 --- do integer division
@c endfile
@ignore
@@ -31945,12 +31949,15 @@ using this user-defined function:
#
# Name changed from div() to intdiv()
# April, 2015
+#
+# Changed to intdiv0()
+# April, 2016
@c endfile
@end ignore
@c file eg/lib/intdiv.awk
-function intdiv(numerator, denominator, result)
+function intdiv0(numerator, denominator, result)
@{
split("", result)
@@ -32037,6 +32044,7 @@ because it's quite easy to modify for tiny memory devices with smallish
word sizes. See
@uref{http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899}.
@end quotation
+@end ifset
@node POSIX Floating Point Problems
@section Standards Versus Existing Practice
@@ -37085,10 +37093,12 @@ The @code{bindtextdomain()}, @code{dcgettext()}, and @code{dcngettext()}
functions for internationalization
(@pxref{Programmer i18n})
+@ifset INTDIV
@item
-The @code{intdiv()} function for doing integer
+The @code{intdiv0()} function for doing integer
division and remainder
(@pxref{Numeric Functions})
+@end ifset
@end itemize
@item
@@ -37880,9 +37890,11 @@ The @command{igawk} program and its manual page are no longer
installed when @command{gawk} is built.
@xref{Igawk Program}.
+@ifset INTDIV
@item
-The @code{intdiv()} function.
+The @code{intdiv0()} function.
@xref{Numeric Functions}.
+@end ifset
@item
The maximum number of hexadecimal digits in @samp{\x} escapes
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index d5707932..4f6d5bec 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -16749,9 +16749,10 @@ truncated toward zero.
For example, @code{int(3)} is 3, @code{int(3.9)} is 3, @code{int(-3.9)}
is @minus{}3, and @code{int(-3)} is @minus{}3 as well.
-@item @code{intdiv(@var{numerator}, @var{denominator}, @var{result})}
-@cindexawkfunc{intdiv}
-@cindex intdiv
+@ifset INTDIV
+@item @code{intdiv0(@var{numerator}, @var{denominator}, @var{result})}
+@cindexawkfunc{intdiv0}
+@cindex intdiv0
Perform integer division, similar to the standard C @code{div()} function.
First, truncate @code{numerator} and @code{denominator}
towards zero, creating integer values. Clear the @code{result}
@@ -16769,6 +16770,7 @@ Precision Integers}).
This function is a @code{gawk} extension. It is not available in
compatibility mode (@pxref{Options}).
+@end ifset
@item @code{log(@var{x})}
@cindexawkfunc{log}
@@ -30939,16 +30941,18 @@ gawk -M 'BEGIN @{ n = 13; print n % 2 @}'
When dividing two arbitrary precision integers with either
@samp{/} or @samp{%}, the result is typically an arbitrary
precision floating point value (unless the denominator evenly
-divides into the numerator). In order to do integer division
+divides into the numerator).
+@ifset INTDIV
+In order to do integer division
or remainder with arbitrary precision integers, use the built-in
-@code{intdiv()} function (@pxref{Numeric Functions}).
+@code{intdiv0()} function (@pxref{Numeric Functions}).
-You can simulate the @code{intdiv()} function in standard @command{awk}
+You can simulate the @code{intdiv0()} function in standard @command{awk}
using this user-defined function:
@example
@c file eg/lib/intdiv.awk
-# intdiv --- do integer division
+# intdiv0 --- do integer division
@c endfile
@ignore
@@ -30959,12 +30963,15 @@ using this user-defined function:
#
# Name changed from div() to intdiv()
# April, 2015
+#
+# Changed to intdiv0()
+# April, 2016
@c endfile
@end ignore
@c file eg/lib/intdiv.awk
-function intdiv(numerator, denominator, result)
+function intdiv0(numerator, denominator, result)
@{
split("", result)
@@ -31051,6 +31058,7 @@ because it's quite easy to modify for tiny memory devices with smallish
word sizes. See
@uref{http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=899}.
@end quotation
+@end ifset
@node POSIX Floating Point Problems
@section Standards Versus Existing Practice
@@ -36099,10 +36107,12 @@ The @code{bindtextdomain()}, @code{dcgettext()}, and @code{dcngettext()}
functions for internationalization
(@pxref{Programmer i18n})
+@ifset INTDIV
@item
-The @code{intdiv()} function for doing integer
+The @code{intdiv0()} function for doing integer
division and remainder
(@pxref{Numeric Functions})
+@end ifset
@end itemize
@item
@@ -36894,9 +36904,11 @@ The @command{igawk} program and its manual page are no longer
installed when @command{gawk} is built.
@xref{Igawk Program}.
+@ifset INTDIV
@item
-The @code{intdiv()} function.
+The @code{intdiv0()} function.
@xref{Numeric Functions}.
+@end ifset
@item
The maximum number of hexadecimal digits in @samp{\x} escapes